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
final FirebaseAuth _auth = FirebaseAuth.instance; |
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
class FlutterPhoneAuth extends StatefulWidget { | |
@override | |
_FlutterPhoneAuthState createState() => _FlutterPhoneAuthState(); | |
} | |
class _FlutterPhoneAuthState extends State<FlutterPhoneAuth> { | |
String _phoneNo; | |
String _verificationId; |
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
@override | |
void dispose() { | |
_numberController?.dispose(); | |
_otpController?.dispose(); | |
super.dispose(); | |
} |
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
dependencies: | |
flutter: | |
sdk: flutter | |
firebase_auth: ^0.8.2 |
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
class CarouselProductImages extends StatelessWidget { | |
final Product product; | |
CarouselProductImages(this.product); | |
@override | |
Widget build(BuildContext context) { | |
return CarouselSlider( | |
height: (MediaQuery.of(context).size.height * 2) / 3, | |
viewportFraction: 1.0, |
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 'dart:convert'; | |
import 'package:http/http.dart' as http; | |
import 'package:flutter/material.dart'; | |
class MyHomePage extends StatefulWidget { | |
@override | |
_MyHomePageState createState() => new _MyHomePageState(); | |
} | |
class _MyHomePageState extends State<MyHomePage> { |
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
Widget makeCollectionList(JweleryKartBloc bloc) => Container( | |
height: 300.0, | |
child: Card( | |
margin: EdgeInsets.all(0.0), | |
shape: RoundedRectangleBorder(borderRadius: BorderRadius.zero), | |
child: Column( | |
children: <Widget>[ | |
Text("Collections"), | |
StreamBuilder( | |
stream: bloc.menCollections, |
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
Widget makeCollectionItem(Collection collection) => Container( | |
margin: EdgeInsets.all(8.0), | |
child: Column( | |
children: <Widget>[ | |
Container( | |
width: 200.0, | |
height: 200.0, | |
child: Image.network( | |
collection.collectionImageURL, | |
fit: BoxFit.cover, |
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
Widget makeItemList(JweleryKartBloc bloc) => StreamBuilder( | |
stream: bloc.menOffers, | |
builder: (BuildContext context, AsyncSnapshot<List<OfferBrief>> snapshot) { | |
if (!snapshot.hasData) { | |
return Center( | |
child: CircularProgressIndicator(), | |
); | |
} | |
return GridView.builder( | |
shrinkWrap: true, |