add fake navigation

WORK-LDE
Lucas Delanier 2 years ago
parent d4558a5da0
commit 30150df695

@ -13,7 +13,9 @@ class _FinishButtonState extends State<FinishButton> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ElevatedButton( return ElevatedButton(
onPressed: () {}, onPressed: () {
Navigator.pushNamed(context, '/feed');
},
style: ButtonStyle( style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(Color(0xFF1C1C1C)), backgroundColor: MaterialStateProperty.all(Color(0xFF1C1C1C)),
overlayColor: overlayColor:

@ -8,7 +8,9 @@ class JoinButton extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ElevatedButton( return ElevatedButton(
onPressed: () {}, onPressed: () {
Navigator.pushNamed(context, '/register');
},
child: Text( child: Text(
"Rejoindre", "Rejoindre",
style: GoogleFonts.plusJakartaSans( style: GoogleFonts.plusJakartaSans(

@ -13,7 +13,9 @@ class _LoginButtonState extends State<LoginButton> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ElevatedButton( return ElevatedButton(
onPressed: () {}, onPressed: () {
Navigator.pushNamed(context, '/explanation');
},
style: ButtonStyle( style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(Color(0xFF1C1C1C)), backgroundColor: MaterialStateProperty.all(Color(0xFF1C1C1C)),
overlayColor: overlayColor:

@ -158,7 +158,7 @@ class _PostComponentState extends State<PostComponent> {
), ),
), ),
)), )),
SizedBox(height: 10), SizedBox(height: 15),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -363,7 +363,7 @@ class _PostComponentState extends State<PostComponent> {
), ),
), ),
)), )),
SizedBox(height: 10), SizedBox(height: 15),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,

@ -124,6 +124,10 @@ class _TopNavBarComponentState extends State<TopNavBarComponent> {
), ),
Flexible( Flexible(
flex: 1, flex: 1,
child: GestureDetector(
onTap: () {
Navigator.pushNamed(context, '/profile');
},
child: ClipOval( child: ClipOval(
child: SizedBox.fromSize( child: SizedBox.fromSize(
// Image radius // Image radius
@ -133,6 +137,7 @@ class _TopNavBarComponentState extends State<TopNavBarComponent> {
), ),
), ),
), ),
),
) )
], ],
), ),

@ -1,7 +1,13 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:justmusic/screens/explanations_screen.dart';
import 'package:justmusic/screens/feed_screen.dart'; import 'package:justmusic/screens/feed_screen.dart';
import 'package:justmusic/screens/login_screen.dart';
import 'package:justmusic/screens/post_screen.dart';
import 'package:justmusic/screens/profile_screen.dart';
import 'package:justmusic/screens/registration_screen.dart';
import 'package:justmusic/screens/welcome_screen.dart';
import 'package:justmusic/view_model/UserViewModel.dart'; import 'package:justmusic/view_model/UserViewModel.dart';
void main() { void main() {
@ -20,6 +26,15 @@ class MyApp extends StatelessWidget {
return ScreenUtilInit( return ScreenUtilInit(
builder: (context, child) { builder: (context, child) {
return MaterialApp( return MaterialApp(
routes: {
'/welcome': (context) => WellcomeScreen(),
'/feed': (context) => FeedScreen(),
'/login': (context) => LoginScreen(),
'/register': (context) => RegistrationScreen(),
'/post': (context) => PostScreen(),
'/profile': (context) => ProfileScreen(),
'/explanation': (context) => ExplanationsScreen(),
},
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
theme: ThemeData( theme: ThemeData(
// This is the theme of your application. // This is the theme of your application.
@ -33,9 +48,7 @@ class MyApp extends StatelessWidget {
// is not restarted. // is not restarted.
primarySwatch: Colors.blue, primarySwatch: Colors.blue,
), ),
home: const SafeArea( home: WellcomeScreen());
child: FeedScreen(),
));
}, },
designSize: Size(390, 844), designSize: Size(390, 844),
); );

@ -1,6 +1,7 @@
import 'package:circular_reveal_animation/circular_reveal_animation.dart'; import 'package:circular_reveal_animation/circular_reveal_animation.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:google_fonts/google_fonts.dart'; import 'package:google_fonts/google_fonts.dart';
import '../components/comment_component.dart'; import '../components/comment_component.dart';
@ -52,6 +53,12 @@ class _FeedScreenState extends State<FeedScreen>
animationController.forward(); animationController.forward();
} }
Future<void> resetFullScreen() async {
await SystemChannels.platform.invokeMethod<void>(
'SystemChrome.restoreSystemUIOverlays',
);
}
void changeFeed(bool choice) { void changeFeed(bool choice) {
// Mettez ici le code pour l'action que vous souhaitez effectuer avec le paramètre // Mettez ici le code pour l'action que vous souhaitez effectuer avec le paramètre
if (choice) { if (choice) {
@ -82,7 +89,15 @@ class _FeedScreenState extends State<FeedScreen>
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(20), topRight: Radius.circular(20))), topLeft: Radius.circular(20), topRight: Radius.circular(20))),
builder: ((context) { builder: ((context) {
return Container( return GestureDetector(
onTap: () {
FocusScopeNode currentFocus = FocusScope.of(context);
if (!currentFocus.hasPrimaryFocus) {
currentFocus.unfocus();
resetFullScreen();
}
},
child: Container(
height: 720.h, height: 720.h,
margin: const EdgeInsets.only(top: 10), margin: const EdgeInsets.only(top: 10),
child: Column( child: Column(
@ -142,15 +157,79 @@ class _FeedScreenState extends State<FeedScreen>
), ),
), ),
), ),
Container( Padding(
padding: EdgeInsets.only(top: 300), padding: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom),
child: Container(
height: 70, height: 70,
width: double.infinity, width: double.infinity,
color: Colors.grey, decoration: BoxDecoration(
child: TextField(), border: Border(
top: BorderSide(color: grayColor, width: 2)),
color: textFieldMessage),
child: Center(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
child: Row(
children: [
ClipOval(
child: SizedBox.fromSize(
// Image radius
child: const Image(
image: AssetImage(
"assets/images/exemple_profile.png"),
width: 45,
),
),
), ),
SizedBox(
width: 10,
),
Expanded(
child: TextField(
keyboardAppearance: Brightness.dark,
cursorColor: primaryColor,
keyboardType: TextInputType.emailAddress,
style: GoogleFonts.plusJakartaSans(
color: Colors.white),
decoration: InputDecoration(
suffixIcon: Icon(
Icons.send,
color: grayText,
size: 20,
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
width: 1, color: grayText),
borderRadius: BorderRadius.all(
Radius.circular(100))),
contentPadding: EdgeInsets.only(
top: 0,
bottom: 0,
left: 20,
right: 20),
fillColor: bgModal,
filled: true,
focusColor:
Color.fromRGBO(255, 255, 255, 0.30),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
width: 1, color: grayText),
borderRadius: BorderRadius.all(
Radius.circular(100))),
hintText: 'Ajoutez une réponse...',
hintStyle: GoogleFonts.plusJakartaSans(
color: grayText)),
),
)
], ],
), ),
),
)),
),
],
),
),
); );
}), }),
); );
@ -159,6 +238,7 @@ class _FeedScreenState extends State<FeedScreen>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
resizeToAvoidBottomInset: true,
backgroundColor: bgColor, backgroundColor: bgColor,
body: Stack( body: Stack(
children: [ children: [

@ -29,10 +29,15 @@ class _ProfileScreenState extends State<ProfileScreen> {
child: Stack( child: Stack(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
children: [ children: [
Image( GestureDetector(
onTap: () {
Navigator.pop(context);
},
child: Image(
image: AssetImage("assets/images/return_icon.png"), image: AssetImage("assets/images/return_icon.png"),
height: 11.h, height: 11.h,
), ),
),
Align( Align(
child: Text( child: Text(
"Profile", "Profile",

@ -14,6 +14,7 @@ const strokeTextField = Color(0xFF373546);
const unactiveFeed = Color(0xFF848484); const unactiveFeed = Color(0xFF848484);
const gradiantPost = Color(0xFF0D0D0D); const gradiantPost = Color(0xFF0D0D0D);
const bgModal = Color(0xFF1E1E1E); const bgModal = Color(0xFF1E1E1E);
const textFieldMessage = Color(0xFF232323);
const bgComment = Color(0xFF222222); const bgComment = Color(0xFF222222);
const bgAppBar = Color(0xFF181818); const bgAppBar = Color(0xFF181818);
const grayText = Color(0xFF898989); const grayText = Color(0xFF898989);

Loading…
Cancel
Save