Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- import 'package:voting_app/FirstPage.dart';
- void main()=> runApp(new MyApp());
- class MyApp extends StatelessWidget {
- @override
- Widget build(BuildContext context) {
- return MaterialApp(
- debugShowCheckedModeBanner: false,
- home: new MyHomePage(),
- routes: <String, WidgetBuilder> {
- '/first': (BuildContext context) => FirstPage(),
- } ,
- );
- }
- }
- class MyHomePage extends StatefulWidget {
- @override
- _MyHomePageState createState() => new _MyHomePageState();
- }
- class _MyHomePageState extends State<MyHomePage> {
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- resizeToAvoidBottomPadding: false,
- body: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: <Widget>[
- Container(
- child: Stack(
- children: <Widget>[
- Container(
- padding: EdgeInsets.fromLTRB(15.0, 110.0, 0.0, 0.0),
- child: Text(
- 'Ballot',
- style: TextStyle(
- fontSize: 80.0, fontWeight: FontWeight.bold
- )
- ),
- ),
- Container(
- padding: EdgeInsets.fromLTRB(17.0, 182.0, 0.0, 0.0),
- child: Text(
- 'Every vote counts',
- style: TextStyle(
- fontSize: 30.0, fontWeight: FontWeight.bold
- )
- ),
- ),
- Container(
- padding: EdgeInsets.fromLTRB(255.0, 173.0, 0.0, 0.0),
- child: Text(
- '.',
- style: TextStyle(
- fontSize: 40.0, fontWeight: FontWeight.bold, color: Colors.red[600]
- )
- ),
- )
- ],
- ),
- ),
- Container(
- padding: EdgeInsets.only(top: 95.0, left: 20.0, right: 20.0),
- child: Column(
- children: <Widget>[
- TextField(
- decoration: InputDecoration(
- labelText: 'VOTER ID',
- labelStyle: TextStyle(
- fontFamily: 'Montserrat',
- fontWeight: FontWeight.bold,
- color: Colors.grey
- )
- ),
- ),
- SizedBox(height: 20.0),
- TextField(
- decoration: InputDecoration(
- labelText: 'DOB',
- labelStyle: TextStyle(
- fontFamily: 'Montserrat',
- fontWeight: FontWeight.bold,
- color: Colors.grey
- )
- ),
- ),
- SizedBox(height: 150.0),
- Container(
- height: 50.0,
- child: Material(
- borderRadius: BorderRadius.circular(20.0),
- shadowColor: Colors.red[600],
- elevation: 7.0,
- color: Colors.red[600],
- child: RaisedButton(
- onPressed: () => signIn(context),
- child: Text(
- 'Vote!',
- style: TextStyle(
- fontWeight: FontWeight.bold,
- fontFamily: 'Matserrat',
- color: Colors.white,
- ),
- ),
- ),
- ),
- )
- ],
- ),
- ),
- ],
- ),
- );
- }
- void signIn(BuildContext context){
- Navigator.pushReplacementNamed(context, '/First');
- }
- }
Add Comment
Please, Sign In to add comment