Initial commit
BIN
img/bg_tile.jpg
Normal file
|
After Width: | Height: | Size: 104 KiB |
BIN
img/i_alcohol.png
Normal file
|
After Width: | Height: | Size: 304 B |
BIN
img/i_card.png
Normal file
|
After Width: | Height: | Size: 297 B |
BIN
img/i_delivery.png
Normal file
|
After Width: | Height: | Size: 605 B |
BIN
img/i_eggs.png
Normal file
|
After Width: | Height: | Size: 426 B |
BIN
img/i_gluten.png
Normal file
|
After Width: | Height: | Size: 670 B |
BIN
img/i_glutenFree.png
Normal file
|
After Width: | Height: | Size: 746 B |
BIN
img/i_lactose.png
Normal file
|
After Width: | Height: | Size: 249 B |
BIN
img/i_lactoseFree.png
Normal file
|
After Width: | Height: | Size: 442 B |
BIN
img/i_peanuts.png
Normal file
|
After Width: | Height: | Size: 560 B |
BIN
img/i_pets.png
Normal file
|
After Width: | Height: | Size: 522 B |
BIN
img/i_seaFood.png
Normal file
|
After Width: | Height: | Size: 511 B |
BIN
img/i_sesame.png
Normal file
|
After Width: | Height: | Size: 585 B |
BIN
img/i_soy.png
Normal file
|
After Width: | Height: | Size: 561 B |
BIN
img/i_vegan.png
Normal file
|
After Width: | Height: | Size: 392 B |
BIN
img/i_vegetarian.png
Normal file
|
After Width: | Height: | Size: 594 B |
BIN
img/logo_mint.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
img/logo_white.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
@@ -8,97 +8,45 @@ class App extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
title: 'Flutter Demo',
|
title: 'Menui',
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
primarySwatch: Colors.green,
|
primarySwatch: Colors.orange,
|
||||||
|
backgroundColor: Colors.grey,
|
||||||
visualDensity: VisualDensity.adaptivePlatformDensity,
|
visualDensity: VisualDensity.adaptivePlatformDensity,
|
||||||
),
|
),
|
||||||
home: MyHomePage(title: 'Menui - food guide'),
|
home: HomePage(title: 'Menui - food guide'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class MyHomePage extends StatefulWidget {
|
class HomePage extends StatefulWidget {
|
||||||
MyHomePage({Key key, this.title}) : super(key: key);
|
HomePage({Key key, this.title}) : super(key: key);
|
||||||
|
|
||||||
// This widget is the home page of your application. It is stateful, meaning
|
|
||||||
// that it has a State object (defined below) that contains fields that affect
|
|
||||||
// how it looks.
|
|
||||||
|
|
||||||
// This class is the configuration for the state. It holds the values (in this
|
|
||||||
// case the title) provided by the parent (in this case the App widget) and
|
|
||||||
// used by the build method of the State. Fields in a Widget subclass are
|
|
||||||
// always marked "final".
|
|
||||||
|
|
||||||
final String title;
|
final String title;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_MyHomePageState createState() => _MyHomePageState();
|
_HomePageState createState() => _HomePageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _MyHomePageState extends State<MyHomePage> {
|
class _HomePageState extends State<HomePage> {
|
||||||
int _counter = 0;
|
|
||||||
|
|
||||||
void _incrementCounter() {
|
|
||||||
setState(() {
|
|
||||||
// This call to setState tells the Flutter framework that something has
|
|
||||||
// changed in this State, which causes it to rerun the build method below
|
|
||||||
// so that the display can reflect the updated values. If we changed
|
|
||||||
// _counter without calling setState(), then the build method would not be
|
|
||||||
// called again, and so nothing would appear to happen.
|
|
||||||
_counter++;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
// This method is rerun every time setState is called, for instance as done
|
|
||||||
// by the _incrementCounter method above.
|
|
||||||
//
|
|
||||||
// The Flutter framework has been optimized to make rerunning build methods
|
|
||||||
// fast, so that you can just rebuild anything that needs updating rather
|
|
||||||
// than having to individually change instances of widgets.
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
body: Container(
|
||||||
// Here we take the value from the MyHomePage object that was created by
|
decoration: BoxDecoration(
|
||||||
// the App.build method, and use it to set our appbar title.
|
image: DecorationImage(
|
||||||
title: Text(widget.title),
|
image: AssetImage("img/bg_tile.jpg"), fit: BoxFit.cover)),
|
||||||
),
|
child: Center(
|
||||||
body: Center(
|
child: Column(
|
||||||
// Center is a layout widget. It takes a single child and positions it
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
// in the middle of the parent.
|
children: <Widget>[
|
||||||
child: Column(
|
Image.asset(
|
||||||
// Column is also a layout widget. It takes a list of children and
|
"img/logo_mint.png",
|
||||||
// arranges them vertically. By default, it sizes itself to fit its
|
width: 160,
|
||||||
// children horizontally, and tries to be as tall as its parent.
|
),
|
||||||
//
|
],
|
||||||
// Invoke "debug painting" (press "p" in the console, choose the
|
),
|
||||||
// "Toggle Debug Paint" action from the Flutter Inspector in Android
|
|
||||||
// Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
|
|
||||||
// to see the wireframe for each widget.
|
|
||||||
//
|
|
||||||
// Column has various properties to control how it sizes itself and
|
|
||||||
// how it positions its children. Here we use mainAxisAlignment to
|
|
||||||
// center the children vertically; the main axis here is the vertical
|
|
||||||
// axis because Columns are vertical (the cross axis would be
|
|
||||||
// horizontal).
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: <Widget>[
|
|
||||||
Text(
|
|
||||||
'You have pushed the button this many times:',
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'$_counter',
|
|
||||||
style: Theme.of(context).textTheme.headline4,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
floatingActionButton: FloatingActionButton(
|
|
||||||
onPressed: _incrementCounter,
|
|
||||||
tooltip: 'Increment',
|
|
||||||
child: Icon(Icons.add),
|
|
||||||
), // This trailing comma makes auto-formatting nicer for build methods.
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
11
pubspec.yaml
@@ -3,7 +3,7 @@ description: Menui app for mobile devices
|
|||||||
|
|
||||||
# The following line prevents the package from being accidentally published to
|
# The following line prevents the package from being accidentally published to
|
||||||
# pub.dev using `pub publish`. This is preferred for private packages.
|
# pub.dev using `pub publish`. This is preferred for private packages.
|
||||||
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
publish_to: "none" # Remove this line if you wish to publish to pub.dev
|
||||||
|
|
||||||
# The following defines the version and build number for your application.
|
# The following defines the version and build number for your application.
|
||||||
# A version number is three numbers separated by dots, like 1.2.43
|
# A version number is three numbers separated by dots, like 1.2.43
|
||||||
@@ -24,7 +24,6 @@ dependencies:
|
|||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
|
||||||
|
|
||||||
# The following adds the Cupertino Icons font to your application.
|
# The following adds the Cupertino Icons font to your application.
|
||||||
# Use with the CupertinoIcons class for iOS style icons.
|
# Use with the CupertinoIcons class for iOS style icons.
|
||||||
cupertino_icons: ^1.0.0
|
cupertino_icons: ^1.0.0
|
||||||
@@ -38,16 +37,12 @@ dev_dependencies:
|
|||||||
|
|
||||||
# The following section is specific to Flutter.
|
# The following section is specific to Flutter.
|
||||||
flutter:
|
flutter:
|
||||||
|
|
||||||
# The following line ensures that the Material Icons font is
|
# The following line ensures that the Material Icons font is
|
||||||
# included with your application, so that you can use the icons in
|
# included with your application, so that you can use the icons in
|
||||||
# the material Icons class.
|
# the material Icons class.
|
||||||
uses-material-design: true
|
uses-material-design: true
|
||||||
|
assets:
|
||||||
# To add assets to your application, add an assets section, like this:
|
- img/
|
||||||
# assets:
|
|
||||||
# - images/a_dot_burr.jpeg
|
|
||||||
# - images/a_dot_ham.jpeg
|
|
||||||
|
|
||||||
# An image asset can refer to one or more resolution-specific "variants", see
|
# An image asset can refer to one or more resolution-specific "variants", see
|
||||||
# https://flutter.dev/assets-and-images/#resolution-aware.
|
# https://flutter.dev/assets-and-images/#resolution-aware.
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import 'package:menui_mobile/main.dart';
|
|||||||
void main() {
|
void main() {
|
||||||
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
|
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
|
||||||
// Build our app and trigger a frame.
|
// Build our app and trigger a frame.
|
||||||
await tester.pumpWidget(MyApp());
|
await tester.pumpWidget(App());
|
||||||
|
|
||||||
// Verify that our counter starts at 0.
|
// Verify that our counter starts at 0.
|
||||||
expect(find.text('0'), findsOneWidget);
|
expect(find.text('0'), findsOneWidget);
|
||||||
|
|||||||