-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e179944
commit 1b4a408
Showing
15 changed files
with
348 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
const double _extraSmall = 5; | ||
const double _small = 10; | ||
const double _medium = 15; | ||
const double _large = 20; | ||
const double _extraLarge = 25; | ||
|
||
class BorderRadiusHelper { | ||
static BorderRadiusGeometry get extraSmallAll => | ||
BorderRadius.circular(_extraSmall); | ||
static BorderRadiusGeometry get smallAll => BorderRadius.circular(_small); | ||
static BorderRadiusGeometry get mediumAll => BorderRadius.circular(_medium); | ||
static BorderRadiusGeometry get largeAll => BorderRadius.circular(_large); | ||
static BorderRadiusGeometry get extraLargeAll => | ||
BorderRadius.circular(_extraLarge); | ||
} | ||
|
||
class EdgeInsetsHelper { | ||
static EdgeInsetsGeometry get extraSmallAll => | ||
const EdgeInsets.all(_extraSmall); | ||
static EdgeInsetsGeometry get smallAll => const EdgeInsets.all(_small); | ||
static EdgeInsetsGeometry get mediumAll => const EdgeInsets.all(_medium); | ||
static EdgeInsetsGeometry get largeAll => const EdgeInsets.all(_large); | ||
static EdgeInsetsGeometry get extraLargeAll => | ||
const EdgeInsets.all(_extraLarge); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:google_fonts/google_fonts.dart'; | ||
|
||
List<ThemeData> themes = [ | ||
ThemeData( | ||
primaryColor: Colors.blue, | ||
primarySwatch: Colors.blue, | ||
fontFamily: GoogleFonts.montserrat().fontFamily, | ||
), | ||
ThemeData(primaryColor: Colors.red), | ||
ThemeData(primaryColor: Colors.green), | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
import 'package:stacked/stacked.dart'; | ||
import 'package:stacked_services/stacked_services.dart'; | ||
import 'package:stacked_starter_template/app/app.locator.dart'; | ||
|
||
class AboutViewModel extends BaseViewModel {} | ||
class AboutViewModel extends BaseViewModel { | ||
final navigationService = locator<NavigationService>(); | ||
|
||
void back() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:stacked/stacked.dart'; | ||
|
||
import 'demo_grid_viewmodel.dart'; | ||
|
||
class DemoGridView extends StatelessWidget { | ||
@override | ||
Widget build(BuildContext context) { | ||
return ViewModelBuilder<DemoGridViewModel>.reactive( | ||
viewModelBuilder: () => DemoGridViewModel(), | ||
builder: ( | ||
BuildContext context, | ||
DemoGridViewModel model, | ||
Widget? child, | ||
) { | ||
return Scaffold( | ||
appBar: AppBar(title: Text('Demo Grid View')), | ||
body: Center( | ||
child: Text( | ||
'DemoGridView', | ||
), | ||
), | ||
); | ||
}, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import 'package:stacked/stacked.dart'; | ||
|
||
class DemoGridViewModel extends BaseViewModel {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:stacked/stacked.dart'; | ||
import 'package:stacked_starter_template/ui/views/demo_list/demo_list_viewmodel.dart'; | ||
|
||
class DemoListView extends StatelessWidget { | ||
@override | ||
Widget build(BuildContext context) { | ||
return ViewModelBuilder<DemoListViewModel>.reactive( | ||
viewModelBuilder: () => DemoListViewModel(), | ||
builder: ( | ||
BuildContext context, | ||
DemoListViewModel model, | ||
Widget? child, | ||
) { | ||
return Scaffold( | ||
appBar: AppBar(title: Text('Demo List View')), | ||
body: ListView.separated( | ||
itemCount: 10, | ||
itemBuilder: (context, index) { | ||
return ListTile( | ||
tileColor: Colors.grey[100], | ||
leading: CircleAvatar(radius: 30), | ||
title: Text('$index'), | ||
subtitle: Text('Awesome'), | ||
isThreeLine: true, | ||
trailing: IconButton( | ||
icon: Icon(Icons.more_horiz), | ||
onPressed: () {}, | ||
), | ||
); | ||
}, | ||
separatorBuilder: (context, index) { | ||
return SizedBox(height: 10); | ||
}, | ||
), | ||
); | ||
}, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import 'package:stacked/stacked.dart'; | ||
import 'package:stacked_services/stacked_services.dart'; | ||
import 'package:stacked_starter_template/app/app.locator.dart'; | ||
|
||
class DemoListViewModel extends BaseViewModel { | ||
final navigationService = locator<NavigationService>(); | ||
} |
Oops, something went wrong.