revamp new trip flow
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'package:anyway/pages/settings.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:anyway/constants.dart';
|
||||
@@ -6,10 +7,9 @@ import 'package:anyway/structs/trip.dart';
|
||||
import 'package:anyway/modules/trips_saved_list.dart';
|
||||
import 'package:anyway/utils/load_trips.dart';
|
||||
|
||||
import 'package:anyway/pages/new_trip.dart';
|
||||
import 'package:anyway/pages/new_trip_location.dart';
|
||||
import 'package:anyway/pages/current_trip.dart';
|
||||
import 'package:anyway/pages/onboarding.dart';
|
||||
import 'package:anyway/pages/profile.dart';
|
||||
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ class _BasePageState extends State<BasePage> {
|
||||
)
|
||||
);
|
||||
},
|
||||
label: Text("Plan a trip now"),
|
||||
label: Text("Plan a trip"),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -74,33 +74,33 @@ class _BasePageState extends State<BasePage> {
|
||||
}
|
||||
} else if (widget.mainScreen == "tutorial") {
|
||||
currentView = OnboardingPage();
|
||||
} else if (widget.mainScreen == "profile") {
|
||||
currentView = ProfilePage();
|
||||
} else if (widget.mainScreen == "settings") {
|
||||
currentView = SettingsPage();
|
||||
}
|
||||
|
||||
final ThemeData theme = Theme.of(context);
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: Text(APP_NAME)),
|
||||
body: Center(child: currentView),
|
||||
drawer: Drawer(
|
||||
child: Column(
|
||||
children: [
|
||||
DrawerHeader(
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(colors: [Colors.red, Colors.yellow])
|
||||
gradient: APP_GRADIENT,
|
||||
),
|
||||
height: 150,
|
||||
child: Center(
|
||||
child: Text(
|
||||
APP_NAME,
|
||||
style: TextStyle(
|
||||
color: Colors.grey[800],
|
||||
color: Colors.white,
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
ListTile(
|
||||
title: const Text('Your Trips'),
|
||||
leading: const Icon(Icons.map),
|
||||
@@ -130,7 +130,7 @@ class _BasePageState extends State<BasePage> {
|
||||
},
|
||||
child: const Text('Clear trips'),
|
||||
),
|
||||
const Divider(),
|
||||
const Divider(indent: 10, endIndent: 10),
|
||||
ListTile(
|
||||
title: const Text('How to use'),
|
||||
leading: Icon(Icons.help),
|
||||
@@ -148,11 +148,11 @@ class _BasePageState extends State<BasePage> {
|
||||
ListTile(
|
||||
title: const Text('Settings'),
|
||||
leading: const Icon(Icons.settings),
|
||||
selected: widget.mainScreen == "profile",
|
||||
selected: widget.mainScreen == "settings",
|
||||
onTap: () {
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder: (context) => BasePage(mainScreen: "profile")
|
||||
builder: (context) => BasePage(mainScreen: "settings")
|
||||
)
|
||||
);
|
||||
},
|
||||
|
Reference in New Issue
Block a user