sharara_apps_building_helpers 2.1.0 copy "sharara_apps_building_helpers: ^2.1.0" to clipboard
sharara_apps_building_helpers: ^2.1.0 copied to clipboard

A new sharara package to make developing more easy and efficient.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:hive_flutter/adapters.dart';
import 'package:sharara_apps_building_helpers/sharara_apps_building_helpers.dart';
import 'package:sharara_apps_building_helpers/ui.dart';

main()async{
  WidgetsFlutterBinding.ensureInitialized();
  await Hive.initFlutter();
  await ShararaAppHelperInitializer.initialize(
    withOuter:true
  );
  runApp(
      ShararaAppHelper(
      builder:(BuildContext context)=>const FirstScreen())
  );


}

class FirstScreen extends StatelessWidget {
  const FirstScreen({super.key});
  @override
  Widget build(BuildContext context) {
    return const Test();
  }
}
class Test extends StatelessWidget {
  const Test({super.key});


  Future<CompletingResults?> r()async{
    await Future.delayed(const Duration(seconds:3));
    return const CompletingResults(
      success:false,
      label:"Everything is Done"
    );
  }
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      drawer:Drawer(
        child:ListView(
          children: const [
            SizedBox(height: 80,),
            Text("Hi")
          ],
        ),
      ),
      floatingActionButton:FloatingActionButton(
        child:const Icon(Icons.add),
        onPressed:(){},
      ),
      appBar:AppBar(
        title:const Text("app bar"),
        centerTitle:true,
      ),
      body:Center(
          child:Column(
            mainAxisAlignment:MainAxisAlignment.center,
            children: [


               Card(
                child:Padding(
                  padding: const EdgeInsets.all(8.0),
                  child: Column(
                    children: [
                      Container(
                        padding:const EdgeInsets.all(10),
                        child:const Icon(Icons.ac_unit_outlined),
                      ),

                      Container(
                        padding:const EdgeInsets.all(10),
                        child: Text("${Colors.green.value}"),
                      ),
                    ],
                  ),
                ),
              ),


              ElevatedButton(
                onPressed:()async{
                  FunctionHelpers.
                  jumpTo(context, const ShararaThemePicker());
                  FunctionHelpers.toast("success",status:true);
                },
                child:const Text("settings"),
              ),


              ElevatedButton(
                onPressed:()async{
                    FunctionHelpers.jumpTo(context,
                      Scaffold(
                        appBar:AppBar(
                          title:const Text("outer screen "),
                        ),
                        body: Column(
                          mainAxisAlignment:MainAxisAlignment.center,
                          crossAxisAlignment:CrossAxisAlignment.center,
                          children: [
                            RoyalRoundedButton(
                              title:"check",
                              onPressed:(){
                                OuterScreenMaskController.instance
                                    .launch(TaskProgressHolder(title: "جاري رفع البيانات", future:
                                          r()
                                ));
                                },
                            )
                          ],
                        ),
                      )
                    );
                  },
                child:const Text("check outer mask"),
              ),


              const SizedBox(height:20,),

              RoyalPhoneTextFormField(title: "hi", controller: PhoneTextEditController()),

              const SizedBox(height:20,),

              RoyalRoundedButton(
                title:"phone",
                onPressed:(){
                  FunctionHelpers
                  .jumpTo(context,
                   FbPhoneAuthScreen(
                       phoneNumber: "+9647807832184",
                       onVerificationSucceed:(_){})
                  );
                },
              )


            ],
          )
      ),
    );
  }
}
1
likes
105
points
452
downloads

Publisher

unverified uploader

Weekly Downloads

A new sharara package to make developing more easy and efficient.

Documentation

API reference

License

unknown (license)

Dependencies

country_picker, dio, firebase_auth, firebase_core, flutter, fluttertoast, hive, hive_flutter, share_plus, url_launcher, whatsapp_author

More

Packages that depend on sharara_apps_building_helpers