Added Welcome Page
parent
89924242f4
commit
63178cbcbc
|
@ -12,6 +12,7 @@ This Flutter application helps entrepreneurs find the right co-founders who comp
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
|
![Welcome screen](lib/assets/screenshots/welcome.png)
|
||||||
![Home screen](lib/assets/screenshots/home.png)
|
![Home screen](lib/assets/screenshots/home.png)
|
||||||
![Matching screen: Swipe left](lib/assets/screenshots/swipe_left.png)
|
![Matching screen: Swipe left](lib/assets/screenshots/swipe_left.png)
|
||||||
![Matching screen: Swipe right](lib/assets/screenshots/swipe_right.png)
|
![Matching screen: Swipe right](lib/assets/screenshots/swipe_right.png)
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 50 KiB |
|
@ -368,16 +368,9 @@ class _UserDataPageState extends State<UserDataPage> {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title:
|
title:
|
||||||
Text('${widget.isRegProcess ? 'User Data' : 'Edit your data'} '),
|
Text('${widget.isRegProcess ? 'About you' : 'Edit your data'} '),
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
actions: [
|
actions: [
|
||||||
if (widget.isRegProcess)
|
|
||||||
IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
AuthService().signOut();
|
|
||||||
},
|
|
||||||
icon: const Icon(Icons.logout),
|
|
||||||
),
|
|
||||||
if (widget.isEditMode && !widget.isRegProcess)
|
if (widget.isEditMode && !widget.isRegProcess)
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
@ -504,7 +497,12 @@ class _UserDataPageState extends State<UserDataPage> {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
const TextBold(text: 'Gender'),
|
const TextWithBold(
|
||||||
|
boldText: 'Gender ',
|
||||||
|
trailingText: ' (optional)',
|
||||||
|
boldSize: 18,
|
||||||
|
trailingSize: 12,
|
||||||
|
),
|
||||||
Align(
|
Align(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: SegmentedButton<Gender>(
|
child: SegmentedButton<Gender>(
|
||||||
|
|
|
@ -0,0 +1,85 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import '../components/text_bold.dart';
|
||||||
|
import '../constants.dart';
|
||||||
|
import '../services/auth/auth_service.dart';
|
||||||
|
import 'user_data_page.dart';
|
||||||
|
|
||||||
|
class WelcomePage extends StatelessWidget {
|
||||||
|
const WelcomePage({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
title: const Text('Start now'),
|
||||||
|
),
|
||||||
|
body: Padding(
|
||||||
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
const TextBold(
|
||||||
|
text: 'Welcome to ${Constants.appTitle}',
|
||||||
|
fontSize: 24,
|
||||||
|
),
|
||||||
|
const SizedBox(height: 16),
|
||||||
|
const Text(
|
||||||
|
'The goal of this app is to help you find the ideal co-founder for your startup. '
|
||||||
|
'It aims to connect people with similar goals, complementary '
|
||||||
|
'skills, and shared interests to create successful partnerships.',
|
||||||
|
style: TextStyle(fontSize: 16),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 16),
|
||||||
|
const Text(
|
||||||
|
'To achieve this and get the most out of the app, '
|
||||||
|
'you will be asked to share some information about yourself '
|
||||||
|
'in the next steps. This includes the following details:\n'
|
||||||
|
'\u25CF Personal Information: Your name, year of birth, and spoken languages will help match you with others.\n'
|
||||||
|
'\u25CF Your Location: To suggest and find co-founders near you.\n'
|
||||||
|
'\u25CF Your Skills and Experiences: To find the ideal co-founder with complementary skills.\n'
|
||||||
|
'\u25CF Your Goals and Interests: To ensure you share a similar vision.\n',
|
||||||
|
style: TextStyle(fontSize: 16),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 24),
|
||||||
|
Center(
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
ElevatedButton.icon(
|
||||||
|
onPressed: () {
|
||||||
|
AuthService().signOut();
|
||||||
|
},
|
||||||
|
label: const Text('Sign out'),
|
||||||
|
icon: const Icon(Icons.logout),
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
width: 16,
|
||||||
|
),
|
||||||
|
ElevatedButton.icon(
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (BuildContext context) =>
|
||||||
|
const UserDataPage(
|
||||||
|
isRegProcess: true,
|
||||||
|
isEditMode: false,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
label: const Text('Continue'),
|
||||||
|
icon: const Icon(Icons.navigate_next),
|
||||||
|
iconAlignment: IconAlignment.start,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,11 +1,12 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:cloud_firestore/cloud_firestore.dart';
|
import 'package:cloud_firestore/cloud_firestore.dart';
|
||||||
import 'package:firebase_auth/firebase_auth.dart';
|
import 'package:firebase_auth/firebase_auth.dart';
|
||||||
import 'auth_service.dart';
|
|
||||||
import 'login_or_register.dart';
|
|
||||||
import '../../constants.dart';
|
import '../../constants.dart';
|
||||||
import '../../pages/home_page.dart';
|
import '../../pages/home_page.dart';
|
||||||
import '../../pages/user_data_page.dart';
|
import '../../pages/welcome_page.dart';
|
||||||
|
import 'auth_service.dart';
|
||||||
|
import 'login_or_register.dart';
|
||||||
|
|
||||||
class AuthGate extends StatelessWidget {
|
class AuthGate extends StatelessWidget {
|
||||||
const AuthGate({super.key});
|
const AuthGate({super.key});
|
||||||
|
@ -37,10 +38,7 @@ class AuthGate extends StatelessWidget {
|
||||||
return const HomePage();
|
return const HomePage();
|
||||||
} else {
|
} else {
|
||||||
// also in case of (snapshot.hasError)
|
// also in case of (snapshot.hasError)
|
||||||
return const UserDataPage(
|
return const WelcomePage();
|
||||||
isRegProcess: true,
|
|
||||||
isEditMode: false,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue