0 purchases
agnext common library flutter
Agnext Common library for reusable various widgets and functions
Features #
Agnext Common library for reusable various widgets and functions
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
//this is required to be add in main dart file otherevise all dimension are not working and also this package use getx management packages you can modity if required
return ScreenUtilInit(
designSize: const Size(360, 690),
minTextAdapt: true,
splitScreenMode: true,
builder: (_, child) {
return GetMaterialApp(
theme: new ThemeData(
appBarTheme: AppBarTheme(
iconTheme: IconThemeData(
color: Colors.black
)
),
),
smartManagement: SmartManagement.onlyBuilder,
debugShowCheckedModeBanner: false,
locale: const Locale('en', 'US'),
defaultTransition: Transition.rightToLeft,
home:MyHomePage(title: "Home page",) ,
);
}
);
}
}
copied to clipboard
Scaffold(
appBar:CommonWidgets.customAppBar(
title: "custom app bar",
actions: <Widget>[
CommonWidgets.setPadding(
rightPadding: margin_20,
widget:Icon(Icons.favorite,color: CommonColors.white,)
),
],
appBarBGColor: CommonColors.primaryColor,
appBarTitleColor: CommonColors.white
),
copied to clipboard
child: CommonWidgets.setPaddingAll(
margin: margin_20,
widget: Column(
children: [
//use common text and easily add font size with minimal code
],
),
),
copied to clipboard
CommonWidgets.commonText("this is commonWidget",fontSize: font_16,color: CommonColors.primaryColor),
copied to clipboard
CommonWidgets.sizedBox(height: height_20),
CommonWidgets.sizedBox(width: width_20),
copied to clipboard
CommonWidgets.networkImages("https://fastly.picsum.photos/id/230/200/300.jpg?hmac=pyhlpgJN2oBeEzhJbnJYrCsLoJM6MKd_NUQGIQhVx5k",
height: height_200,
width: width_170
),
copied to clipboard
CustomButton(buttonText: "open bottonSheet", onClick: (){
})
copied to clipboard
CommonBottomSheet.commonBottomSheet(
body:CommonWidgets.setPaddingAll(
margin: margin_20,
widget: Container(
width: CommonWidgets.fullWidth(context),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Align(
alignment: Alignment.topLeft,
child: IconButton(
icon: Icon(Icons.close),
onPressed: (){
Get.back();
},
),
),
CommonWidgets.commonText("this is common Bottomsheet",fontSize: font_16,color: CommonColors.primaryColor),
],
),
),
)
);
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.