Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hashirshoaeb committed Feb 12, 2021
1 parent bd907e3 commit 903706c
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class MyApp extends StatelessWidget {
builder: (context, box, widget) {
return c.CupertinoApp(
debugShowCheckedModeBanner: false,
initialRoute: '/home',
initialRoute: 'home',
title: "StarBook",
theme: c.CupertinoThemeData(brightness: brightness),
localizationsDelegates: [
Expand Down
8 changes: 4 additions & 4 deletions lib/routes/route_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,23 @@ class RouteGenerator {
// return MaterialWithModalsPageRoute(
// builder: (context) => UsernameAddSheet(),
// );
case "/home":
case "home":
return MaterialWithModalsPageRoute(
builder: (context) => HomePage(),
);
case "/activity":
case "activity":
return MaterialWithModalsPageRoute(
builder: (context) => ActivityPage(args),
);
// case "/year":
// return MaterialWithModalsPageRoute(
// builder: (context) => YearPage(),
// );
case "/preferance":
case "preferance":
return CupertinoModalBottomSheetRouteWrapper(
builder: (context, controller) => PreferanceSheet(),
);
case "/edit":
case "edit":
return CupertinoModalBottomSheetRouteWrapper(
builder: (context, controller) => ActivityRouteInitializer(args),
);
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/activity_edit_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class _ActivityEditSheetState extends State<ActivityEditSheet> {
context,
),
leading: Container(),
middle: Text('${(type == ActivityType.add) ? 'Add' : 'Edit'} Acitvity'),
middle: Text('${(type == ActivityType.add) ? 'Add' : 'Edit'} Activity'),
trailing: c.CupertinoButton(
onPressed: activity.isFilled() ? () => onDone(context) : null,
child: Text('Done'),
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/activity_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ActivityPage extends StatelessWidget {
final Activity activity;

void onEdit(BuildContext context) async {
await Navigator.of(context).popAndPushNamed("/edit", arguments: activity);
await Navigator.of(context).popAndPushNamed("edit", arguments: activity);
}

@override
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/profile_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ import 'package:flutter/widgets.dart';

class PreferanceButton extends StatelessWidget {
void onTap(context) {
Navigator.of(context).pushNamed('/preferance');
Navigator.of(context).pushNamed('preferance');
}

@override
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/date.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ int getPreviousYear(int month, int year) {
/// List of months name
const List<String> _monthList = const <String>[
'January',
'Feburary',
'February',
'March',
'April',
'May',
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/day.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ class Day extends StatelessWidget {
},
);
} else if (activity.moodId == null) {
Navigator.of(context).pushNamed("/edit", arguments: activity);
Navigator.of(context).pushNamed("edit", arguments: activity);
} else {
Navigator.of(context).pushNamed('/activity', arguments: activity);
Navigator.of(context).pushNamed('activity', arguments: activity);
}
}

Expand Down

0 comments on commit 903706c

Please sign in to comment.