Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F86467860
opening_view.dart
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Oct 6, 16:20
Size
3 KB
Mime Type
text/x-c++
Expires
Tue, Oct 8, 16:20 (2 d)
Engine
blob
Format
Raw Data
Handle
21426213
Attached To
R12599 MStream: Microlearning video recommendation experiment
opening_view.dart
View Options
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
import 'package:responsive_sizer/responsive_sizer.dart';
import 'package:suggestions_app/screens/homeScreen.dart';
import 'package:suggestions_app/screens/youtubeSearch.dart';
import 'package:suggestions_app/utils/colors.dart' as colors;
import 'dart:math';
class OpeningView extends StatelessWidget {
@override
Widget build(BuildContext context) {
final firebaseUser = context.watch<User?>();
if (firebaseUser != null) {
return HomeScreen();
}
return Scaffold(
body: SafeArea(
child: SingleChildScrollView(
child: Container(
width: 100.w,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: 3.h),
Container(
width: min(70.w, 400),
height: min(70.w, 400),
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/images/video-tutorials.png"),
),
),
),
SizedBox(height: 10.h),
Container(
width: 85.w,
child: Text("Sign up and watch some videos",
style: GoogleFonts.lato(fontSize: 22.sp, color: colors.textDarkGray, fontWeight: FontWeight.bold,),
textAlign: TextAlign.center),
),
SizedBox(height: 2.h),
Container(
width: min(90.w, 1200),
//child: Text(
// "Watching youtube videos and not learn anything can be a little bit annoying.\n\n Sign up to solve that problem. What are you waiting for?",
//style: GoogleFonts.lato(fontSize: 16.sp, color: colors.textLigthGray),
//textAlign: TextAlign.center),
),
SizedBox(height: 5.h),
Container(
width: 50.w,
height: 60,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30.0),
color: colors.mainRed,
),
child: MaterialButton(
onPressed: () {
Navigator.pushNamed(context, '/signUp');
},
child: Text("GET STARTED",
style: GoogleFonts.lato(
color: Colors.white,
fontSize: 18.sp,
fontWeight: FontWeight.bold
),
),
),
),
SizedBox(height: 3.h),
Container(
width: 90.w,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"Already have an account? ",
style: GoogleFonts.lato(fontSize: 16.sp, color: colors.textDarkGray),
textAlign: TextAlign.center),
GestureDetector(
onTap: () {
Navigator.pushNamed(context, '/signIn');
},
child: Text(
"Sign In",
style: GoogleFonts.lato(fontSize: 16.sp, color: colors.mainRed),
textAlign: TextAlign.center),
),
],
),
),
SizedBox(height: 3.h),
],
),
),
),
),
);
}
}
Event Timeline
Log In to Comment