parent
1c82a6962e
commit
e2a13215c0
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 792 KiB |
After Width: | Height: | Size: 439 KiB |
@ -0,0 +1,78 @@
|
||||
import 'package:auto_size_text/auto_size_text.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
import '../values/constants.dart';
|
||||
|
||||
class TopNavBarComponent extends StatefulWidget {
|
||||
const TopNavBarComponent({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<TopNavBarComponent> createState() => _TopNavBarComponentState();
|
||||
}
|
||||
|
||||
class _TopNavBarComponentState extends State<TopNavBarComponent> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(top: defaultPadding),
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: defaultPadding),
|
||||
width: double.infinity,
|
||||
height: 100,
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
const Flexible(
|
||||
flex: 1,
|
||||
child: Image(
|
||||
image: AssetImage("assets/images/add_friend.png"),
|
||||
width: 25,
|
||||
),
|
||||
),
|
||||
ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: 170),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Image(
|
||||
image: AssetImage("assets/images/logo.png"),
|
||||
height: 30,
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
AutoSizeText(
|
||||
"Mes amis",
|
||||
style: GoogleFonts.plusJakartaSans(
|
||||
fontWeight: FontWeight.w300,
|
||||
fontSize: 16,
|
||||
color: unactiveFeed),
|
||||
),
|
||||
AutoSizeText(
|
||||
"Discovery",
|
||||
style: GoogleFonts.plusJakartaSans(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 16,
|
||||
color: Colors.white),
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const Flexible(
|
||||
flex: 1,
|
||||
child: Image(
|
||||
image: AssetImage("assets/images/add_friend.png"),
|
||||
width: 25,
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
|
||||
import '../components/post_component.dart';
|
||||
import '../components/top_nav_bar_component.dart';
|
||||
import '../values/constants.dart';
|
||||
|
||||
class FeedScreen extends StatefulWidget {
|
||||
const FeedScreen({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<FeedScreen> createState() => _FeedScreenState();
|
||||
}
|
||||
|
||||
class _FeedScreenState extends State<FeedScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: bgColor,
|
||||
body: Stack(
|
||||
children: [
|
||||
SingleChildScrollView(
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: Align(
|
||||
child: ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: 500),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: defaultPadding),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(top: 100.h),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
PostComponent(),
|
||||
PostComponent(),
|
||||
PostComponent(),
|
||||
PostComponent(),
|
||||
],
|
||||
),
|
||||
)),
|
||||
),
|
||||
),
|
||||
),
|
||||
)),
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Container(
|
||||
height: 240.h,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(begin: Alignment.topRight, stops: [
|
||||
0,
|
||||
1
|
||||
], colors: [
|
||||
bgColor.withOpacity(1),
|
||||
bgColor.withOpacity(0)
|
||||
])),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.topCenter,
|
||||
child: ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: 800),
|
||||
child: const TopNavBarComponent(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue