Skip to content

Commit

Permalink
Update image asset paths in image_assets.dart and pubspec.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
c3k4ah committed Apr 24, 2024
1 parent e50d874 commit fc391fb
Show file tree
Hide file tree
Showing 9 changed files with 243 additions and 150 deletions.
2 changes: 1 addition & 1 deletion lib/data/image_assets.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:flutter/foundation.dart';
// import 'package:flutter/foundation.dart';

final ImageAssets imageAsset = ImageAssets();

Expand Down
38 changes: 3 additions & 35 deletions lib/data/social_media.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,51 +8,19 @@ List<SMediaModel> reseauxListe = [
SMediaModel(
name: 'Github',
link: 'link',
icon: Icon(
UniconsLine.github,
color: whiteColor,
size: 35,
),
icon: UniconsLine.github,
bgColor: Colors.black,
),
SMediaModel(
name: 'Facebook',
link: 'link',
icon: Icon(
UniconsLine.facebook_f,
color: whiteColor,
size: 35,
),
icon: UniconsLine.facebook_f,
bgColor: Colors.blue.shade700,
),
SMediaModel(
name: 'Discord',
link: 'link',
icon: Icon(
UniconsLine.discord,
color: whiteColor,
size: 35,
),
bgColor: Colors.deepPurple,
),
SMediaModel(
name: 'LinkedIn',
link: 'link',
icon: Icon(
UniconsLine.linkedin,
color: whiteColor,
size: 35,
),
icon: UniconsLine.linkedin,
bgColor: Colors.blueAccent,
),
SMediaModel(
name: 'Gmail',
link: 'link',
icon: Icon(
UniconsLine.google,
color: whiteColor,
size: 35,
),
bgColor: Colors.amber.shade700,
),
];
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ void main() {
}
runApp(
DevicePreview(
enabled: false,
enabled: true,
builder: (context) => const MyApp(), // Wrap your app
),
);
Expand Down
2 changes: 1 addition & 1 deletion lib/models/social_media_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
class SMediaModel {
final String name;
final String link;
final Icon icon;
final IconData icon;
final Color bgColor;

SMediaModel({
Expand Down
80 changes: 46 additions & 34 deletions lib/pages/home/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,26 +45,26 @@ class _HomePageState extends State<HomePage> {
controller: _scrollController,
child: Column(
children: [
const CoverPhotoPart(),
MyProjectPart(
size: Size(
_size.width(context),
_size.height(context),
),
),
MyParcoursPart(
size: Size(
_size.width(context),
_size.height(context),
),
),
const MyBigPart(),
AwardPart(
size: Size(
_size.width(context),
_size.height(context),
),
),
// const CoverPhotoPart(),
// MyProjectPart(
// size: Size(
// _size.width(context),
// _size.height(context),
// ),
// ),
// MyParcoursPart(
// size: Size(
// _size.width(context),
// _size.height(context),
// ),
// ),
// const MyBigPart(),
// AwardPart(
// size: Size(
// _size.width(context),
// _size.height(context),
// ),
// ),
MyFooterPart(
size: Size(
_size.width(context),
Expand All @@ -76,24 +76,36 @@ class _HomePageState extends State<HomePage> {
),
),
),
// bottomNavigationBar: Container(
// height: 50,
// color: Colors.deepPurple,
// child: Center(
// child: Text(
// 'width: ${MediaQuery.sizeOf(context).width} px',
// style: const TextStyle(
// color: Colors.white,
// fontSize: 16,
// fontFamily: 'Poppins',
// ),
// ),
// ),
// ),
bottomNavigationBar: Container(
height: 50,
color: Colors.deepPurple,
child: Center(
child: Text(
'width: ${MediaQuery.sizeOf(context).width} px | ${getDevice(MediaQuery.sizeOf(context))}',
style: const TextStyle(
color: Colors.white,
fontSize: 16,
fontFamily: 'Poppins',
),
),
),
),
);
}
}

String getDevice(Size size) {
if (size.width >= 1024) {
return 'desktop';
} else if (size.width >= 700) {
return 'tablet';
} else if (size.width >= 500) {
return 'mobileLarge';
} else {
return 'mobile';
}
}

double getNecessaryPadding(BuildContext context) {
double width = MediaQuery.sizeOf(context).width;
double myWidth = 1366;
Expand Down
Loading

0 comments on commit fc391fb

Please sign in to comment.