[ad_1]
import 'bundle:flutter/materials.dart';
import 'bundle:ionicons/ionicons.dart';
void major() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : tremendous(key: key);
@override
Widget construct(BuildContext context) {
return MaterialApp(
title: 'Advertising',
debugShowCheckedModeBanner: false,
theme: ThemeData(primarySwatch: Colours.blue),
residence: SinginPage(key: UniqueKey()),
);
}
}
class SinginPage extends StatefulWidget {
const SinginPage({required Key key}) : tremendous(key: key);
@override
_SinginPageState createState() => _SinginPageState();
}
class _SinginPageState extends State<SinginPage> {
bool obscureText = false;
ultimate TextEditingController _email = TextEditingController();
ultimate TextEditingController _password = TextEditingController();
ultimate emailGlobalKey = GlobalKey<FormState>();
ultimate passwordGlobalKey = GlobalKey<FormState>();
@override
Widget construct(BuildContext context) {
var currentWidth = MediaQuery.of(context).dimension.width;
var small = currentWidth > 1201;
var extraSmall = currentWidth > 1025;
return Scaffold(
backgroundColor: Colours.white,
physique: Row(
mainAxisAlignment: MainAxisAlignment.heart,
kids: [
Container(
height: extraSmall ? MediaQuery.of(context).size.height : 0.0,
width: small
? MediaQuery.of(context).size.width * 0.72
: extraSmall
? MediaQuery.of(context).size.width - 500
: 0.0,
color: Colors.indigo[200],
youngster: Picture.community(
'https://5.imimg.com/data5/GQ/FP/MY-26802338/online-shopping-system-500x500.jpg',
match: BoxFit.cowl,
),
),
Stack(
alignment: Alignment.topRight,
kids: [
Container(
height: MediaQuery.of(context).size.height,
width: small ? MediaQuery.of(context).size.width * 0.28 : 500,
alignment: Alignment.center,
color: Colors.white,
child: Container(
padding: const EdgeInsets.all(60.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const SizedBox(height: 45.0),
Container(
alignment: Alignment.topLeft,
child: const Text(
'WELCOME TO OUR MARKETING APP',
style: TextStyle(
color: Colors.black,
fontSize: 40.0,
fontWeight: FontWeight.bold),
),
),
const SizedBox(height: 65.0),
Container(
alignment: Alignment.topLeft,
child: const Text('Email'),
),
Form(
key: emailGlobalKey,
child: TextFormField(
onChanged: (value) {
setState(() {
_email.text = value;
});
},
decoration: const InputDecoration(
prefixIcon: Padding(
padding:
EdgeInsets.only(right: 20.0, bottom: 1.0),
child: Icon(Icons.email_outlined,
color: Colors.black45, size: 24.0),
),
contentPadding: EdgeInsets.only(top: 15.0, left: 0),
hintStyle: TextStyle(
fontWeight: FontWeight.normal,
color: Colors.grey),
hintText: 'Email',
focusedBorder: UnderlineInputBorder(
borderSide:
BorderSide(color: Colors.indigo, width: 2.0),
),
),
// validator: Validators.required('Email is required!'),
),
),
const SizedBox(height: 25.0),
Container(
alignment: Alignment.topLeft,
child: const Text('Password'),
),
Form(
key: passwordGlobalKey,
child: TextFormField(
obscureText: obscureText,
onChanged: (value) {
setState(() {
_password.text = value;
});
},
decoration: InputDecoration(
suffixIcon: obscureText
? InkWell(
onTap: () {
setState(() {
obscureText = false;
});
},
child: const Icon(Ionicons.eye,
color: Colors.black54, size: 25.0),
)
: InkWell(
onTap: () {
setState(() {
obscureText = true;
});
},
child: const Icon(Ionicons.eye_off,
color: Colors.black54, size: 25.0),
),
prefixIcon: const Padding(
padding:
EdgeInsets.only(right: 20.0, bottom: 1.0),
child: Icon(Icons.lock_outline,
color: Colors.black45, size: 25.0),
),
contentPadding:
const EdgeInsets.only(top: 15.0, left: 0),
hintStyle: const TextStyle(
fontWeight: FontWeight.normal,
color: Colors.grey),
hintText: 'Password',
focusedBorder: const UnderlineInputBorder(
borderSide:
BorderSide(color: Colors.indigo, width: 2.0),
),
),
// validator:
// Validators.required('Password is required!'),
),
),
const SizedBox(height: 10.0),
Container(
alignment: Alignment.topRight,
child: TextButton(
style: TextButton.styleFrom(
padding: const EdgeInsets.all(0.0)),
onPressed: () {},
child: const Text('Forgot Password'),
)),
const SizedBox(
height: 50.0,
),
SizedBox(
height: 45.0,
width: MediaQuery.of(context).size.width,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
primary: _password.text != ''
? _password.text != ''
? Colors.indigo
: Colors.indigo[300]
: Colours.indigo[300],
elevation: 0.0,
shadowColor: Colours.clear,
form: RoundedRectangleBorder(
borderRadius: BorderRadius.round(50.0)),
padding: const EdgeInsets.solely(
left: 30.0,
prime: 0.0,
proper: 30.0,
backside: 0.0)),
onPressed: () {
emailGlobalKey.currentState?.validate();
passwordGlobalKey.currentState?.validate();
},
youngster: const Textual content('LOGIN',
type: TextStyle(
coloration: Colours.white,
fontWeight: FontWeight.daring)),
),
),
Container(
padding: const EdgeInsets.symmetric(
horizontal: 30.0, vertical: 30.0),
youngster: const Textual content('OR'),
),
Row(
mainAxisAlignment: MainAxisAlignment.heart,
kids: [
InkWell(
onTap: () {},
child: Padding(
padding: const EdgeInsets.only(right: 8.0),
child: Material(
color: Colors.indigo,
borderRadius: BorderRadius.circular(50.0),
child: const Padding(
padding: EdgeInsets.all(10.0),
child: Icon(
Ionicons.logo_facebook,
color: Colors.white,
size: 30.0,
),
),
),
),
),
InkWell(
onTap: () {},
child: Padding(
padding:
const EdgeInsets.only(left: 8.0, right: 8.0),
child: Material(
color: Colors.red,
borderRadius: BorderRadius.circular(50.0),
child: const Padding(
padding: EdgeInsets.all(10.0),
child: Icon(
Ionicons.logo_google,
color: Colors.white,
size: 30.0,
),
)),
),
),
InkWell(
onTap: () {},
child: Padding(
padding: const EdgeInsets.only(left: 8.0),
child: Material(
color: Colors.blue,
borderRadius: BorderRadius.circular(50.0),
child: const Padding(
padding: EdgeInsets.all(10.0),
child: Icon(
Ionicons.logo_twitter,
color: Colors.white,
size: 30.0,
),
),
),
),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.heart,
kids: [
const Text("I don't have an account?"),
TextButton(
onPressed: () {},
child: const Text(
"Sign up",
style: TextStyle(color: Colors.blue),
),
)
],
),
],
),
),
),
Container(
padding: const EdgeInsets.solely(prime: 30.0, proper: 50),
youngster: Icon(
Ionicons.settings_outline,
coloration: Colours.black12.withOpacity(0.03),
dimension: 80.0,
),
),
],
),
],
),
);
}
}
**I’ve this code over right here there’s the Singin button and join button and neglect password button I need to repair it and allow it with the Fb and google and twitter buttons and make it to take me to a different clean web page like residence display screen web page then on the left facet ought to be like a drawer and these advertising app stuff
Word: there’s an error bar on the best facet when i preview it on telephone please assist me repair this even **
[ad_2]
