Initial commit

This commit is contained in:
2020-10-09 18:43:05 +02:00
parent 9d0ece2f52
commit 73597066c8
21 changed files with 26 additions and 83 deletions

BIN
img/bg_tile.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

BIN
img/i_alcohol.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

BIN
img/i_card.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 B

BIN
img/i_delivery.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 605 B

BIN
img/i_eggs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 B

BIN
img/i_gluten.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

BIN
img/i_glutenFree.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 746 B

BIN
img/i_lactose.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

BIN
img/i_lactoseFree.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

BIN
img/i_peanuts.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

BIN
img/i_pets.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 522 B

BIN
img/i_seaFood.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 511 B

BIN
img/i_sesame.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 B

BIN
img/i_soy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 561 B

BIN
img/i_vegan.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

BIN
img/i_vegetarian.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

BIN
img/logo_mint.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
img/logo_white.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -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<MyHomePage> {
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<HomePage> {
@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: <Widget>[
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: <Widget>[
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.
);
}
}

View File

@@ -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.

View File

@@ -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);