Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- import 'package:flutter/services.dart';
- // Search Result Class
- import './search.dart';
- void main() => runApp(home());
- class home extends StatefulWidget {
- @override
- _homeState createState() => _homeState();
- }
- class _homeState extends State<home> {
- @override
- Widget build(BuildContext context) {
- SystemChrome.setPreferredOrientations([
- DeviceOrientation.portraitUp,
- DeviceOrientation.portraitDown,
- ]);
- return new MaterialApp(
- theme: ThemeData(primaryColor: Colors.greenAccent),
- routes: <String, WidgetBuilder>{
- "/search":(BuildContext context)=>new search(titleName: "State Bank",)
- },
- home: new Scaffold(
- resizeToAvoidBottomPadding: false,
- body: new Stack(
- fit: StackFit.passthrough,
- children: <Widget>[
- new Container(
- child: new Column(
- children: <Widget>[
- Padding(
- padding: EdgeInsets.only(bottom: 280.0),
- ),
- new Container(
- padding: EdgeInsets.all(8.0),
- child: Image(
- image:
- AssetImage("assets/images/homeBackgroundImage.png"),
- ),
- ),
- ],
- ),
- ),
- new SafeArea(
- child: new Center(
- child: new Column(
- crossAxisAlignment: CrossAxisAlignment.center,
- mainAxisAlignment: MainAxisAlignment.start,
- children: <Widget>[
- Padding(
- padding: EdgeInsets.only(top: 15.0),
- ),
- Image(
- image: AssetImage("assets/images/cisco.png"),
- width: 150.0,
- height: 29.0,
- ),
- Padding(
- padding: EdgeInsets.only(top: 100.0),
- ),
- Text(
- "Enter Search Query",
- style: TextStyle(fontSize: 20.0),
- ),
- Padding(
- padding: EdgeInsets.only(top: 10.0),
- ),
- FractionallySizedBox(
- widthFactor: 0.75,
- child: TextField(
- enabled: true,
- decoration: InputDecoration(
- contentPadding: EdgeInsets.only(top: 20.0, left: 8.0),
- border: OutlineInputBorder(
- borderRadius: BorderRadius.all(Radius.circular(0)),
- ),
- enabledBorder: OutlineInputBorder(
- borderSide: BorderSide(
- color: Colors.greenAccent,
- )),
- disabledBorder: UnderlineInputBorder(
- borderSide: BorderSide(color: Colors.brown)),
- ),
- textAlign: TextAlign.center,
- ),
- ),
- Padding(
- padding: EdgeInsets.only(top: 10.0),
- ),
- RaisedButton(
- onPressed: (){
- Navigator.pushNamed(context, "/search");
- },
- elevation: 1,
- child: Text(
- "Search",
- style: TextStyle(color: Colors.white),
- ),
- color: Colors.greenAccent,
- ),
- ],
- ),
- ),
- ),
- Positioned(
- child: Align(
- alignment: FractionalOffset.bottomCenter,
- child: Container(
- padding: EdgeInsets.all(8.0),
- decoration: BoxDecoration(color: Colors.greenAccent),
- child: Row(
- children: <Widget>[
- new Text(
- "FAQ",
- style: TextStyle(color: Colors.white, fontSize: 28.0),
- )
- ],
- ),
- ),
- ),
- )
- ],
- ),
- ),
- );
- }
- }
Add Comment
Please, Sign In to add comment