Skip to content

Commit

Permalink
Merge pull request #33 from manasiPandey21/rebuild_player_form_ui
Browse files Browse the repository at this point in the history
Rebuild player form UI
  • Loading branch information
UMESH-042 committed Dec 23, 2023
2 parents 6edc73c + f670472 commit a472e02
Show file tree
Hide file tree
Showing 8 changed files with 122 additions and 659 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if (localPropertiesFile.exists()) {

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
throw GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
Expand Down
9 changes: 0 additions & 9 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
buildscript {
<<<<<<< HEAD
ext.kotlin_version = '1.9.10'
=======
ext.kotlin_version = '1.7.10'
>>>>>>> Rebuildthescreen
repositories {
google()
jcenter()
}

dependencies {
<<<<<<< HEAD
classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.android.tools.build:gradle:7.2.0'
=======
classpath 'com.google.gms:google-services:4.3.14'
classpath 'com.android.tools.build:gradle:7.3.0'
>>>>>>> Rebuildthescreen
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down
5 changes: 0 additions & 5 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,7 @@ class MyApp extends StatelessWidget {
title: 'CSGO League',
theme: ThemeData(
primaryColor: CustomColors.primaryColor,
<<<<<<< HEAD
colorScheme: ColorScheme.fromSwatch()
.copyWith(secondary: CustomColors.secondaryColor),
=======
hintColor: CustomColors.secondaryColor,
>>>>>>> Rebuildthescreen
textTheme:
GoogleFonts.poppinsTextTheme(Theme.of(context).textTheme),
),
Expand Down
6 changes: 0 additions & 6 deletions lib/screens/onboarding/onboarding_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -245,14 +245,8 @@ class _OnboardingScreenState extends State<OnboardingScreen> {
child: Align(
alignment: FractionalOffset.bottomRight,
child: TextButton(
<<<<<<< HEAD
onPressed: () => Navigator.of(context)
.pushReplacementNamed(SignInScreen.routeName),
=======
onPressed:
() => Navigator.of(context)
.pushReplacementNamed(SignInScreen.routeName),
>>>>>>> Rebuildthescreen
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
Expand Down
105 changes: 63 additions & 42 deletions lib/screens/player/forms/player_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class _PlayerFormState extends State<PlayerForm> {
Future<void> _showMyDialog() async {
return showDialog<void>(
context: context,
barrierDismissible: false, // user must tap button!
barrierDismissible: false,
builder: (BuildContext context) {
return AlertDialog(
title: const Text('Compulsary!!'),
Expand Down Expand Up @@ -75,7 +75,7 @@ class _PlayerFormState extends State<PlayerForm> {

var permissionStatus = await Permission.photos.status;

if (permissionStatus.isGranted) {
//if (permissionStatus.isGranted) {
//Select Image
// image = (await _imagePicker.getImage(source: ImageSource.gallery))!;
// var file = File(image.path);
Expand All @@ -99,18 +99,17 @@ class _PlayerFormState extends State<PlayerForm> {
} else {
print('No Image Path Received');
}
} else {
print('Permission not granted. Try Again with permission access');
}
// }
// else {
// print('Permission not granted. Try Again with permission access');
// }
}

final _formKey = GlobalKey<FormState>();

@override
Widget build(BuildContext context) {
return Scaffold(
// backgroundColor: CustomColors.primaryColor,

body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.only(top: 24),
Expand All @@ -119,15 +118,18 @@ class _PlayerFormState extends State<PlayerForm> {
child: Column(
children: [
Container(
padding: EdgeInsets.all(15),
margin: EdgeInsets.only(top: 10),
padding: EdgeInsets.all(20),
width: double.infinity,
child: Text(
"Player Details Form",
style: TextStyle(color: Colors.yellow, fontSize: 30),
child: Center(
child: Text(
"Player Registration",
style: TextStyle(color: Colors.yellow, fontSize: 30),
),
),
),
SizedBox(
height: 15,
height: 12,
),
Center(
child: GestureDetector(
Expand All @@ -137,22 +139,22 @@ class _PlayerFormState extends State<PlayerForm> {
child: ClipRRect(
borderRadius: BorderRadius.circular(200),
child: Container(
width: 200,
height: 200,
width: 150,
height: 150,
decoration: BoxDecoration(color: Colors.grey),
child: _image != null
? Image.file(
_image,
width: 200.0,
height: 200.0,
width: 150.0,
height: 150.0,
fit: BoxFit.fitHeight,
)
: Container(
decoration: BoxDecoration(color: Colors.white70),
width: 200,
height: 200,
width: 150,
height: 150,
child: Icon(
Icons.camera_alt_rounded,
Icons.add_a_photo_rounded,
color: Colors.grey[800],
size: 35,
),
Expand All @@ -161,6 +163,7 @@ class _PlayerFormState extends State<PlayerForm> {
),
),
),

SizedBox(
height: 40,
),
Expand All @@ -176,11 +179,11 @@ class _PlayerFormState extends State<PlayerForm> {
style: TextStyle(
fontWeight: FontWeight.w400,
fontSize: 14,
color: Colors.yellow,
color: Colors.white,
),
decoration: InputDecoration(
hintText: "Enter Your Name",
labelText: "Your Name",
labelText: "Name",
hintStyle: TextStyle(color: Colors.white54),
filled: true,
fillColor: CustomColors.taskez1,
Expand Down Expand Up @@ -209,20 +212,22 @@ class _PlayerFormState extends State<PlayerForm> {
}
return null;
},

),
SizedBox(
height: 40.0,
),
TextFormField(
cursorColor: CustomColors.primaryColor,
controller: studentIDcontroller,
keyboardType:TextInputType.number ,
style: TextStyle(
fontWeight: FontWeight.w400,
fontSize: 14,
color: Colors.yellow,
color: Colors.white,
),
decoration: InputDecoration(
hintText: "Ex:-20195513",
hintText: " Ex:-20195513",
labelText: "Student ID",
hintStyle:
TextStyle(color: Colors.white54, fontSize: 16),
Expand Down Expand Up @@ -262,11 +267,11 @@ class _PlayerFormState extends State<PlayerForm> {
style: TextStyle(
fontWeight: FontWeight.w400,
fontSize: 14,
color: Colors.yellow,
color: Colors.white,
),
decoration: InputDecoration(
hintText: "Ex:- MadMani",
labelText: "IGN(In Game Name)",
hintText: " Ex:- MadMani",
labelText: "IGN (In Game Name)",
hintStyle: TextStyle(color: Colors.white54),
filled: true,
fillColor: CustomColors.taskez1,
Expand Down Expand Up @@ -305,7 +310,7 @@ class _PlayerFormState extends State<PlayerForm> {
style: TextStyle(
fontWeight: FontWeight.w400,
fontSize: 14,
color: Colors.yellow,
color: Colors.white,
),
obscureText: false,
decoration: InputDecoration(
Expand Down Expand Up @@ -343,7 +348,7 @@ class _PlayerFormState extends State<PlayerForm> {
},
),
SizedBox(
height: 40.0,
height: 25.0,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
Expand Down Expand Up @@ -371,28 +376,33 @@ class _PlayerFormState extends State<PlayerForm> {
child: Text(
value.toString().split('.').last,
style: TextStyle(
fontSize: 17, color: Colors.blueAccent),
color: primaryWeapons == value
? Colors.yellow // Color for selected item
: Colors.white,
fontSize: 17),
),
);
}).toList(),
onChanged: (value) {
setState(() {
// print('value is : $value');

primaryWeapons = value!;

});
},
// hint: Text(_playerStatus.toString().split('.').last),
),
],
),
SizedBox(
height: 40.0,
height: 10.0,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
" Secondary Weapon",
"Secondary Weapon",
style: TextStyle(
fontSize: 16,
color: Colors.yellow,
Expand All @@ -412,7 +422,11 @@ class _PlayerFormState extends State<PlayerForm> {
child: Text(
value.toString().split('.').last,
style: TextStyle(
fontSize: 17, color: Colors.blueAccent),
color: secondadryWeapons == value
? Colors.yellow // Color for selected item
: Colors.white, // Color for unselected items

fontSize: 17),
),
);
}).toList(),
Expand All @@ -427,15 +441,15 @@ class _PlayerFormState extends State<PlayerForm> {
],
),
SizedBox(
height: 20.0,
height: 25.0,
),
TextFormField(
controller: streamURLcontroller,
obscureText: false,
style: TextStyle(
fontWeight: FontWeight.w400,
fontSize: 14,
color: Colors.yellow,
color: Colors.white,
),
decoration: InputDecoration(
hintText:
Expand Down Expand Up @@ -526,7 +540,8 @@ class _PlayerFormState extends State<PlayerForm> {
),
)),
SizedBox(height: 20),
ElevatedButton.icon(
ElevatedButton(

onPressed: () async {
await Provider.of<Auth>(context, listen: false)
.signOut();
Expand All @@ -536,13 +551,18 @@ class _PlayerFormState extends State<PlayerForm> {
}), (route) => false);
},
style: ElevatedButton.styleFrom(
primary: Colors.blueAccent),
icon: Icon(Icons.arrow_forward),
label: Text(
'Sign Out ?',
style: TextStyle(
color: Colors.white, fontWeight: FontWeight.bold),
),
backgroundColor: Color.fromARGB(255, 73, 82, 96),
shape: RoundedRectangleBorder(borderRadius:BorderRadius.circular(15))
),

child:Padding(
padding: const EdgeInsets.all(14.0),
child: Text(
'Sign Out',
style: TextStyle(
color: Colors.white, fontWeight: FontWeight.bold),
),
),
),
],
),
Expand All @@ -554,4 +574,5 @@ class _PlayerFormState extends State<PlayerForm> {
),
);
}

}
Loading

0 comments on commit a472e02

Please sign in to comment.