-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changed position of sign up page, now login if playing online only.
- Loading branch information
1 parent
155d2eb
commit bf399bc
Showing
8 changed files
with
120 additions
and
69 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:google_fonts/google_fonts.dart'; | ||
import 'package:othello/utils/globals.dart'; | ||
|
||
class EnterName extends StatelessWidget { | ||
static const routeName = "/enter_name"; | ||
final _formKey = GlobalKey<FormState>(); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
backgroundColor: Colors.black, | ||
body: Padding( | ||
padding: const EdgeInsets.all(15), | ||
child: Center( | ||
child: Form( | ||
key: _formKey, | ||
child: TextFormField( | ||
textAlign: TextAlign.center, | ||
style: GoogleFonts.montserrat(fontSize: Globals.primaryFontSize), | ||
decoration: Globals.textFieldDecoration.copyWith( | ||
hintText: 'Enter Name', | ||
prefixIcon: Icon( | ||
Icons.account_box_rounded, | ||
color: Colors.deepOrange, | ||
size: Globals.maxScreenWidth * 0.06, | ||
), | ||
), | ||
validator: (text) { | ||
if (text == null || text.isEmpty) return "Please enter name"; | ||
}, | ||
onFieldSubmitted: (text) { | ||
if (!_formKey.currentState!.validate()) return; | ||
Navigator.pop(context, text); | ||
}, | ||
), | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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