diff --git a/img/bg_tile.jpg b/img/bg_tile.jpg new file mode 100644 index 0000000..d449d3c Binary files /dev/null and b/img/bg_tile.jpg differ diff --git a/img/i_alcohol.png b/img/i_alcohol.png new file mode 100644 index 0000000..7b11a72 Binary files /dev/null and b/img/i_alcohol.png differ diff --git a/img/i_card.png b/img/i_card.png new file mode 100644 index 0000000..327561c Binary files /dev/null and b/img/i_card.png differ diff --git a/img/i_delivery.png b/img/i_delivery.png new file mode 100644 index 0000000..660a98f Binary files /dev/null and b/img/i_delivery.png differ diff --git a/img/i_eggs.png b/img/i_eggs.png new file mode 100644 index 0000000..7dfa8c7 Binary files /dev/null and b/img/i_eggs.png differ diff --git a/img/i_gluten.png b/img/i_gluten.png new file mode 100644 index 0000000..a8fbf1d Binary files /dev/null and b/img/i_gluten.png differ diff --git a/img/i_glutenFree.png b/img/i_glutenFree.png new file mode 100644 index 0000000..fd8f0eb Binary files /dev/null and b/img/i_glutenFree.png differ diff --git a/img/i_lactose.png b/img/i_lactose.png new file mode 100644 index 0000000..564dd2c Binary files /dev/null and b/img/i_lactose.png differ diff --git a/img/i_lactoseFree.png b/img/i_lactoseFree.png new file mode 100644 index 0000000..cd9418c Binary files /dev/null and b/img/i_lactoseFree.png differ diff --git a/img/i_peanuts.png b/img/i_peanuts.png new file mode 100644 index 0000000..f12c6b8 Binary files /dev/null and b/img/i_peanuts.png differ diff --git a/img/i_pets.png b/img/i_pets.png new file mode 100644 index 0000000..4d10998 Binary files /dev/null and b/img/i_pets.png differ diff --git a/img/i_seaFood.png b/img/i_seaFood.png new file mode 100644 index 0000000..751d948 Binary files /dev/null and b/img/i_seaFood.png differ diff --git a/img/i_sesame.png b/img/i_sesame.png new file mode 100644 index 0000000..e230b6a Binary files /dev/null and b/img/i_sesame.png differ diff --git a/img/i_soy.png b/img/i_soy.png new file mode 100644 index 0000000..2274fa0 Binary files /dev/null and b/img/i_soy.png differ diff --git a/img/i_vegan.png b/img/i_vegan.png new file mode 100644 index 0000000..bdef8ed Binary files /dev/null and b/img/i_vegan.png differ diff --git a/img/i_vegetarian.png b/img/i_vegetarian.png new file mode 100644 index 0000000..ff8e16f Binary files /dev/null and b/img/i_vegetarian.png differ diff --git a/img/logo_mint.png b/img/logo_mint.png new file mode 100644 index 0000000..73b0740 Binary files /dev/null and b/img/logo_mint.png differ diff --git a/img/logo_white.png b/img/logo_white.png new file mode 100644 index 0000000..c77970f Binary files /dev/null and b/img/logo_white.png differ diff --git a/lib/main.dart b/lib/main.dart index e806df4..a7d9938 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -8,97 +8,45 @@ class App extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( - title: 'Flutter Demo', + title: 'Menui', theme: ThemeData( - primarySwatch: Colors.green, + primarySwatch: Colors.orange, + backgroundColor: Colors.grey, visualDensity: VisualDensity.adaptivePlatformDensity, ), - home: MyHomePage(title: 'Menui - food guide'), + home: HomePage(title: 'Menui - food guide'), ); } } -class MyHomePage extends StatefulWidget { - MyHomePage({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". - +class HomePage extends StatefulWidget { + HomePage({Key key, this.title}) : super(key: key); final String title; @override - _MyHomePageState createState() => _MyHomePageState(); + _HomePageState createState() => _HomePageState(); } -class _MyHomePageState extends State { - 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++; - }); - } - +class _HomePageState extends State { @override 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( - appBar: AppBar( - // Here we take the value from the MyHomePage object that was created by - // the App.build method, and use it to set our appbar title. - title: Text(widget.title), - ), - body: Center( - // Center is a layout widget. It takes a single child and positions it - // in the middle of the parent. - child: Column( - // Column is also a layout widget. It takes a list of children and - // arranges them vertically. By default, it sizes itself to fit its - // 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: [ - Text( - 'You have pushed the button this many times:', - ), - Text( - '$_counter', - style: Theme.of(context).textTheme.headline4, - ), - ], + body: Container( + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage("img/bg_tile.jpg"), fit: BoxFit.cover)), + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + "img/logo_mint.png", + width: 160, + ), + ], + ), ), ), - floatingActionButton: FloatingActionButton( - onPressed: _incrementCounter, - tooltip: 'Increment', - child: Icon(Icons.add), - ), // This trailing comma makes auto-formatting nicer for build methods. ); } } diff --git a/pubspec.yaml b/pubspec.yaml index 9e5ad98..24c4184 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: Menui app for mobile devices # The following line prevents the package from being accidentally published to # 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. # A version number is three numbers separated by dots, like 1.2.43 @@ -24,7 +24,6 @@ dependencies: flutter: sdk: flutter - # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.0 @@ -38,16 +37,12 @@ dev_dependencies: # The following section is specific to Flutter. flutter: - # The following line ensures that the Material Icons font is # included with your application, so that you can use the icons in # the material Icons class. uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg + assets: + - img/ # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware. diff --git a/test/widget_test.dart b/test/widget_test.dart index 052b984..63675e9 100644 --- a/test/widget_test.dart +++ b/test/widget_test.dart @@ -13,7 +13,7 @@ import 'package:menui_mobile/main.dart'; void main() { testWidgets('Counter increments smoke test', (WidgetTester tester) async { // Build our app and trigger a frame. - await tester.pumpWidget(MyApp()); + await tester.pumpWidget(App()); // Verify that our counter starts at 0. expect(find.text('0'), findsOneWidget);