Skip to content

Instantly share code, notes, and snippets.

@triyono777
Last active April 8, 2022 11:21
Show Gist options
  • Save triyono777/e4f51aa0795def82d1a61c2157deccbd to your computer and use it in GitHub Desktop.
Save triyono777/e4f51aa0795def82d1a61c2157deccbd to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
import 'package:triyonodev/login_screen.dart';
class WelcomeScreen extends StatelessWidget {
const WelcomeScreen({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
body: Column(
children: [
SizedBox(
height: 20,
),
Text('Welcome',
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30)),
Image.asset(
'images/undraw_Notebook_re_id0r.png',
height: 500,
),
SizedBox(
width: 300,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30),
),
),
onPressed: () {
Navigator.of(context).push(
MaterialPageRoute(
builder: (_) => LoginScreen(),
),
);
},
child: Text('Sign In')),
),
SizedBox(
height: 20,
),
SizedBox(
width: 300,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
primary: Colors.grey,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30),
),
),
onPressed: () {},
child: Text('Sign out')),
),
],
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment