quite a few UX improvements
This commit is contained in:
50
frontend/lib/pages/no_trips_page.dart
Normal file
50
frontend/lib/pages/no_trips_page.dart
Normal file
@@ -0,0 +1,50 @@
|
||||
import 'package:anyway/pages/new_trip_location.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:anyway/layouts/scaffold.dart';
|
||||
class NoTripsPage extends StatefulWidget {
|
||||
const NoTripsPage({super.key});
|
||||
|
||||
@override
|
||||
State<NoTripsPage> createState() => _NoTripsPageState();
|
||||
}
|
||||
|
||||
class _NoTripsPageState extends State<NoTripsPage> with ScaffoldLayout {
|
||||
@override
|
||||
Widget build(BuildContext context) => mainScaffold(
|
||||
context,
|
||||
child: Scaffold(
|
||||
body: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"No trips yet",
|
||||
style: Theme.of(context).textTheme.headlineMedium,
|
||||
),
|
||||
Text(
|
||||
"You can start a new trip by clicking the button below",
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
floatingActionButton: FloatingActionButton.extended(
|
||||
onPressed: () {
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const NewTripPage()
|
||||
)
|
||||
);
|
||||
},
|
||||
label: const Row(
|
||||
children: [
|
||||
Text("Start planning!"),
|
||||
Padding(padding: EdgeInsets.only(right: 8.0)),
|
||||
Icon(Icons.map_outlined)
|
||||
],
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user