64 lines
1.6 KiB
Dart
64 lines
1.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'components.dart';
|
|
|
|
void main() {
|
|
runApp(App());
|
|
}
|
|
|
|
class App extends StatelessWidget {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return GestureDetector(
|
|
onTap: () {
|
|
FocusScopeNode currentFocus = FocusScope.of(context);
|
|
if (!currentFocus.hasPrimaryFocus) {
|
|
currentFocus.focusedChild.unfocus();
|
|
}
|
|
},
|
|
child: MaterialApp(
|
|
title: 'Menui',
|
|
theme: ThemeData(
|
|
primarySwatch: Colors.orange,
|
|
primaryColor: Colors.orange,
|
|
accentColor: Colors.grey,
|
|
backgroundColor: Colors.grey,
|
|
visualDensity: VisualDensity.adaptivePlatformDensity,
|
|
),
|
|
home: HomePage(title: 'Menui - food guide'),
|
|
));
|
|
}
|
|
}
|
|
|
|
class HomePage extends StatefulWidget {
|
|
HomePage({Key key, this.title}) : super(key: key);
|
|
final String title;
|
|
|
|
@override
|
|
_HomePageState createState() => _HomePageState();
|
|
}
|
|
|
|
class _HomePageState extends State<HomePage> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
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,
|
|
),
|
|
MenuiSearchBar()
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|