Last active
February 7, 2025 20:52
-
-
Save Luckey-Elijah/cfbaff47879f026ad62c76a2e38cf979 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(const MainApp()); | |
} | |
class MainApp extends StatelessWidget { | |
const MainApp({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
var shape = RoundedRectangleBorder( | |
borderRadius: BorderRadius.circular(4), | |
); | |
return MaterialApp( | |
theme: ThemeData( | |
buttonTheme: ButtonThemeData( | |
shape: shape, | |
), | |
elevatedButtonTheme: ElevatedButtonThemeData( | |
style: ElevatedButton.styleFrom(shape: shape), | |
), | |
iconButtonTheme: IconButtonThemeData( | |
style: IconButton.styleFrom( | |
shape: shape, | |
), | |
), | |
), | |
home: Example(), | |
); | |
} | |
} | |
class Example extends StatelessWidget { | |
const Example({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
body: Center( | |
child: SizedBox( | |
width: 360, | |
child: Padding( | |
padding: const EdgeInsets.symmetric(horizontal: 8.0), | |
child: Column( | |
mainAxisAlignment: MainAxisAlignment.center, | |
crossAxisAlignment: CrossAxisAlignment.stretch, | |
mainAxisSize: MainAxisSize.min, | |
spacing: 4, | |
children: [ | |
TextField( | |
decoration: InputDecoration( | |
border: OutlineInputBorder(), | |
hintText: 'username/email', | |
), | |
), | |
TextField( | |
decoration: InputDecoration( | |
border: OutlineInputBorder(), | |
hintText: 'password', | |
), | |
), | |
ElevatedButton(onPressed: () {}, child: Text('Log In')), | |
ElevatedButton( | |
onPressed: () {}, | |
child: Text('Register'), | |
), | |
Row( | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: [ | |
Expanded( | |
child: SizedBox( | |
height: 1, | |
child: ColoredBox(color: Colors.black), | |
), | |
), | |
Padding( | |
padding: const EdgeInsets.all(8.0), | |
child: Text('Or'), | |
), | |
Expanded( | |
child: SizedBox( | |
height: 1, | |
child: ColoredBox(color: Colors.black), | |
), | |
), | |
], | |
), | |
Center( | |
child: Row( | |
mainAxisAlignment: MainAxisAlignment.spaceEvenly, | |
spacing: 4, | |
children: [ | |
IconButton.filled( | |
onPressed: () {}, | |
icon: Icon(Icons.favorite), | |
), | |
IconButton.filled( | |
onPressed: () {}, | |
icon: Icon(Icons.heart_broken), | |
), | |
], | |
), | |
) | |
], | |
), | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment