TKK_E32210493/lib/home_view.dart

80 lines
2.0 KiB
Dart

import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'login.dart';
// import 'package:nuril_ta/login.dart';
class Home extends StatefulWidget {
@override
State<Home> createState() => _HomeState();
}
class _HomeState extends State<Home> {
Widget banner() {
return Container(
margin: EdgeInsets.only(top: 90),
height: 249,
width: 321,
decoration: BoxDecoration(
image: DecorationImage(image: AssetImage('assets/2.png'))),
);
}
Widget title() {
return Container(
margin: EdgeInsets.only(top: 46),
child: Column(
children: [
Text(
'Hello, Welcome!',
style: GoogleFonts.poppins(
fontSize: 36, fontWeight: FontWeight.bold, color: Colors.white),
),
SizedBox(
height: 14,
),
Text(
'Welcome to iconect control and monitoring kwh meter',
style: GoogleFonts.poppins(
fontSize: 16,
fontWeight: FontWeight.normal,
color: Colors.white),
textAlign: TextAlign.center,
),
],
),
);
}
Widget button() {
return Container(
margin: EdgeInsets.only(top: 46),
height: 54,
width: 300,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(28), color: Color(0xFFDAC0A3)),
child: TextButton(
onPressed: () {
Navigator.push(
context, MaterialPageRoute(builder: (context) => Login()));
},
child: Text('Selanjutnya',
style: GoogleFonts.poppins(
color: Colors.black, fontWeight: FontWeight.bold))),
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xFF102C57),
body: Container(
margin: EdgeInsets.only(left: 30, right: 30),
child: Column(
children: [banner(), title(), button()],
),
),
);
}
}