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 'package:flutter/material.dart'; | |
| import 'package:provider/provider.dart'; | |
| import 'login_screen.dart'; | |
| import '../services/auth.dart'; | |
| class ProfileScreen extends StatefulWidget { | |
| const ProfileScreen({Key? key}) : super(key: key); | |
| @override |
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 'package:firebase_setup/screens/register_screen.dart'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:provider/provider.dart'; | |
| import '../profile/profile_screen.dart'; | |
| import '../services/auth.dart'; | |
| class LoginScreen extends StatefulWidget { | |
| const LoginScreen({Key? key}) : super(key: key); |
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
| //1 | |
| import 'package:flutter/material.dart'; | |
| import 'package:provider/provider.dart'; | |
| import '../profile/profile_screen.dart'; | |
| import '../services/auth.dart'; | |
| class RegisterScreen extends StatefulWidget { | |
| const RegisterScreen({Key? key}) : super(key: key); |
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 User { | |
| final String uid; | |
| final String? email; | |
| User(this.uid, this.email); | |
| } |
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 'package:firebase_auth/firebase_auth.dart' as auth; | |
| import '../model/user_model.dart'; | |
| class Auth { | |
| //1 | |
| final auth.FirebaseAuth _firebaseAuth = auth.FirebaseAuth.instance; | |
| //2 | |
| User? _firebaseUser(auth.User? user) { |
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
| void main() async { | |
| WidgetsFlutterBinding.ensureInitialized(); | |
| await Firebase.initializeApp(); | |
| runApp(const MyApp()); | |
| } |
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 React from 'react'; | |
| import {StyleSheet, ScrollView, View, Text, SectionList} from 'react-native'; | |
| export default class SectionListBasics extends React.Component { | |
| render() { | |
| return ( | |
| <View style={styles.container}> | |
| <SectionList | |
| sections={[ | |
| { |
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
| const styles = StyleSheet.create({ | |
| container: { | |
| flex: 1, | |
| paddingTop: 22, | |
| }, | |
| sectionHeader: { | |
| paddingTop: 2, | |
| paddingBottom: 2, | |
| paddingLeft: 10, | |
| paddingRight: 10, |
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 React from 'react'; | |
| import {StyleSheet, ScrollView, View, Text, SectionList} from 'react-native'; | |
| export default class SectionListBasics extends React.Component { | |
| render() { | |
| return ( | |
| <View style={styles.container}> | |
| <SectionList | |
| sections={[ | |
| { |
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
| renderItem={({item}) => <Text style={styles.item}>{item}</Text>} |
NewerOlder