Leave google only for now
This commit is contained in:
+36
-13
@@ -63,26 +63,21 @@ class _LoginPageState extends State<LoginPage> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
|
SocialLoginWidget(
|
||||||
|
backgroundColor: Color(0xff00aced),
|
||||||
|
iconData: FontAwesomeIcons.twitter,
|
||||||
|
),
|
||||||
FloatingActionButton(
|
FloatingActionButton(
|
||||||
backgroundColor: Color(0xff4285F4),
|
backgroundColor: Color(0xff4285F4),
|
||||||
child: Icon(FontAwesomeIcons.google),
|
child: Icon(FontAwesomeIcons.google),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Provider.of<LoginState>(context).login(LoginProvider.GOOGLE);
|
Provider.of<LoginState>(context)
|
||||||
|
.login(LoginProvider.GOOGLE);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
FloatingActionButton(
|
SocialLoginWidget(
|
||||||
backgroundColor: Color(0xff00aced),
|
|
||||||
child: Icon(FontAwesomeIcons.twitter),
|
|
||||||
onPressed: () {
|
|
||||||
Provider.of<LoginState>(context).login(LoginProvider.TWITTER);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
FloatingActionButton(
|
|
||||||
backgroundColor: Color(0xff3b5998),
|
backgroundColor: Color(0xff3b5998),
|
||||||
child: Icon(FontAwesomeIcons.facebook),
|
iconData: FontAwesomeIcons.facebook,
|
||||||
onPressed: () {
|
|
||||||
Provider.of<LoginState>(context).login(LoginProvider.FACEBOOK);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -166,3 +161,31 @@ class _LoginPageState extends State<LoginPage> {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class SocialLoginWidget extends StatelessWidget {
|
||||||
|
final Color backgroundColor;
|
||||||
|
final IconData iconData;
|
||||||
|
|
||||||
|
const SocialLoginWidget({
|
||||||
|
Key key,
|
||||||
|
@required this.backgroundColor,
|
||||||
|
@required this.iconData,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return FloatingActionButton(
|
||||||
|
backgroundColor: Colors.grey,
|
||||||
|
child: Icon(
|
||||||
|
iconData,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
// Provider.of<LoginState>(context).login(LoginProvider.FACEBOOK);
|
||||||
|
Scaffold.of(context).showSnackBar(SnackBar(
|
||||||
|
content: Text("Comming soon"),
|
||||||
|
));
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user