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 { @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: [ Image.asset( "img/logo_mint.png", width: 160, ), MenuiSearchBar() ], ), ), ), ); } }