Skip to content

Commit

Permalink
Update DevicePreview configuration in main.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
c3k4ah committed Apr 26, 2024
1 parent fc8630e commit a22bbe6
Show file tree
Hide file tree
Showing 30 changed files with 640 additions and 551 deletions.
4 changes: 4 additions & 0 deletions assets/icon/brain.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/icon/logo_blanc.png
Binary file not shown.
Binary file removed assets/icon/logo_blanc2.png
Binary file not shown.
Binary file removed assets/icon/logo_blanc3.png
Binary file not shown.
Binary file removed assets/icon/logo_blanc4.png
Binary file not shown.
Binary file removed assets/images/angry.png
Binary file not shown.
Binary file removed assets/images/angry.webp
Binary file not shown.
Binary file added assets/images/croquis_cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 28 additions & 4 deletions lib/common/colors/colors.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,37 @@
import 'package:flutter/material.dart';

//orange color
Color primaryColor = const Color(0xffFE5944);
Color secondaryColor = const Color(0xffe34c3b);
Color tertioColor = const Color(0xffFFD340);
Color whiteColor = const Color(0xffFFFFFF);
// Color primaryColor = const Color(0xffFE5944);
// Color secondaryColor = const Color(0xffe34c3b);
// Color tertioColor = const Color(0xffFFD340);
// Color whiteColor = const Color(0xffFFFFFF);

// //Blue color
// Color secondaryColor = const Color(0xff537EC5);
// Color primaryColor = const Color(0xff293A80);
// Color tertioColor = const Color(0xffFFE194);
// Color whiteColor = const Color(0xffFFFFFF);

// //Dark color
Color secondaryColor = const Color(0xff222831);
Color primaryColor = const Color(0xff31363F);
Color tertioColor = const Color(0xfff1c40f);
Color whiteColor = const Color(0xffFFFFFF);

// //Green color
// Color secondaryColor = const Color(0xff191A19);
// Color primaryColor = const Color(0xff1E5128);
// Color tertioColor = const Color(0xff4E9F3D);
// Color whiteColor = const Color(0xffD8E9A8);

// //Brown color
// Color secondaryColor = const Color(0xff3E3232);
// Color primaryColor = const Color(0xff503C3C);
// Color tertioColor = const Color(0xffA87C7C);
// Color whiteColor = const Color(0xffFFFFFF);

// //Purlpe color
// Color secondaryColor = const Color(0xff80558C);
// Color primaryColor = const Color(0xffAF7AB3);
// Color tertioColor = const Color(0xffCBA0AE);
// Color whiteColor = const Color(0xffFFFFFF);
10 changes: 10 additions & 0 deletions lib/common/utils/sizes/responsive.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,23 @@ class CustomSize {

class Responsive extends StatelessWidget {
final Widget mobile;
final Widget? small;
final Widget? mobileLarge;
final Widget? tablet;
final Widget desktop;

const Responsive({
Key? key,
this.small,
required this.mobile,
this.tablet,
required this.desktop,
this.mobileLarge,
}) : super(key: key);

static bool isSmall(BuildContext context) =>
MediaQuery.of(context).size.width <= 300;

static bool isMobile(BuildContext context) =>
MediaQuery.of(context).size.width <= 500;

Expand All @@ -45,6 +50,8 @@ class Responsive extends StatelessWidget {
return tablet!;
} else if (size.width >= 500 && mobileLarge != null) {
return mobileLarge!;
} else if (small != null && size.width >= 300) {
return small!;
} else {
return mobile;
}
Expand All @@ -54,6 +61,7 @@ class Responsive extends StatelessWidget {
class ResponsiveSize {
static double number({
required BuildContext context,
double? small,
required double mobile,
required double tablet,
required double mobileLarge,
Expand All @@ -66,6 +74,8 @@ class ResponsiveSize {
return tablet;
} else if (size.width >= 500) {
return mobileLarge;
} else if (size.width >= 300) {
return small ?? mobile;
} else {
return mobile;
}
Expand Down
3 changes: 1 addition & 2 deletions lib/data/image_assets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ class ImageAssets {
String get iteams => '${directory}logo/iteams.png';
String get freelance => '${directory}logo/freelance.png';
//images
String get covertPhoto1 => '${directory}images/angry.webp';
String get covertPhoto2 => '${directory}images/sample.png';
String get covertPhoto1 => '${directory}images/croquis_cover.png';
String get cekahLogo => '${directory}images/cekah.png';
String get chefProject => '${directory}images/cher_project.jpg';
String get designerProject => '${directory}images/designer_project.jpeg';
Expand Down
2 changes: 0 additions & 2 deletions lib/data/social_media.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import 'package:dominick/models/social_media_model.dart';
import 'package:flutter/material.dart';
import 'package:unicons/unicons.dart';

import '../common/colors/colors.dart';

List<SMediaModel> reseauxListe = [
SMediaModel(
name: 'Github',
Expand Down
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: true,
enabled: false,
builder: (context) => const MyApp(), // Wrap your app
),
);
Expand Down
49 changes: 26 additions & 23 deletions lib/pages/home/home.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:dominick/common/colors/colors.dart';
import 'package:dominick/data/image_assets.dart';
import 'package:flutter/material.dart';
import 'package:meta_seo/meta_seo.dart';
import 'package:flutter/foundation.dart';
Expand Down Expand Up @@ -41,7 +40,7 @@ class _HomePageState extends State<HomePage> {
// controller: _scrollController,
// ),
body: Container(
color: const Color.fromARGB(255, 211, 115, 90),
color: Colors.grey.shade900,
child: Container(
margin:
EdgeInsets.symmetric(horizontal: getNecessaryPadding(context)),
Expand All @@ -59,6 +58,7 @@ class _HomePageState extends State<HomePage> {
_size.height(context),
),
),
const SkillsPart(),
MyParcoursPart(
size: Size(
_size.width(context),
Expand Down Expand Up @@ -90,14 +90,17 @@ class _HomePageState extends State<HomePage> {
desktop: 50,
),
),
color: whiteColor,
color: secondaryColor,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'Made with Flutter and Love ❤️.',
style: style(textSize),
),
if (MediaQuery.sizeOf(context).width > 380.0)
Text(
'Made with Flutter and Love ❤️.',
style: style(textSize),
),
if (MediaQuery.sizeOf(context).width > 380.0)
const Spacer(),
Text(
'© ${DateTime.now().year} DOMINICK . All rights reserved.',
style: style(textSize),
Expand All @@ -116,25 +119,25 @@ class _HomePageState extends State<HomePage> {
),
),
),
// 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',
// ),
// ),
// ),
// ),
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',
),
),
),
),
);
}

TextStyle style(double textSize) => TextStyle(
color: secondaryColor,
color: whiteColor,
fontSize: textSize,
fontWeight: FontWeight.bold,
fontFamily: 'Product Sans',
Expand Down
Loading

0 comments on commit a22bbe6

Please sign in to comment.