agnext_common_library_flutter 2.0.3 copy "agnext_common_library_flutter: ^2.0.3" to clipboard
agnext_common_library_flutter: ^2.0.3 copied to clipboard

Agnext common library to reuse various widgets and functions

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",) ,
);

}
);
}
}
 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

       ),
       

      child: CommonWidgets.setPaddingAll(
        margin: margin_20,
        widget: Column(
          children: [
            //use common text and easily add font size with minimal code
          
  ],
        ),
      ),
   

CommonWidgets.commonText("this is commonWidget",fontSize: font_16,color: CommonColors.primaryColor),

          CommonWidgets.sizedBox(height: height_20),
          CommonWidgets.sizedBox(width: width_20),
          
          

       CommonWidgets.networkImages("https://fastly.picsum.photos/id/230/200/300.jpg?hmac=pyhlpgJN2oBeEzhJbnJYrCsLoJM6MKd_NUQGIQhVx5k",
          height: height_200,
            width: width_170
          ),
            CustomButton(buttonText: "open bottonSheet", onClick: (){
             
             })


  
            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),
                      ],
                    
                    ),
                  ),
                )
              );