Skip to content

Instantly share code, notes, and snippets.

@mazharulbelal
Created July 29, 2023 11:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mazharulbelal/77698291df5d10534c493ff2bb18f906 to your computer and use it in GitHub Desktop.
Save mazharulbelal/77698291df5d10534c493ff2bb18f906 to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
void main() {
runApp(const MyApp());
}
//void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
//Set the fit size (Find your UI design, look at the dimensions of the device screen and fill it in,unit in dp)
return ScreenUtilInit(
designSize: const Size(360, 690),
minTextAdapt: true,
splitScreenMode: true,
builder: (context, child) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: HomePage(),
);
},
);
}
}
class HomePage extends StatelessWidget {
final purpleColor = Color(0xff6688FF);
final darkTextColor = Color(0xff1F1A3D);
final lightTextColor = Color(0xff999999);
final textFieldColor = Color(0xffF5F6FA);
final borderColor = Color(0xffD9D9D9);
@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 24.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Hello")
],
),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment