flutter_const

Last updated:

0 purchases

flutter_const Image
flutter_const Images
Add to Cart

Description:

flutter const

widely used flutter widgets and functions. #
Key points :

This package allows developers to fetch data from the server with the easiest way,
FcNavigator navigator that makes the navigation process much easier.
Remove Glow Behavior from a list view.
Pre-Build responsive text style
Horizontal and vertical dimensions SizedBox alternative
Double press exit function
Dark Mode

How to Use #
To use flutter_const, the first starts by importing the package.
import 'package:flutter_const/flutter_const.dart';
copied to clipboard
ListView No Glow #
class Demo extends StatelessWidget {
const Demo({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
return Container(
child: ScrollConfiguration(
behavior: FcNoGlowBehavior(),
child: Container(),
),
);
}
}
copied to clipboard
Backpress #
class Demo extends StatelessWidget {

const Demo({Key? key}) : super(key: key);

@override

Widget build(BuildContext context) {

return Container(

child: WillPopScope(

onWillPop: fcOnWillPop,

child: ListView(),

),

);

}

}
copied to clipboard
Api Call #
Future<Album> fetchAlbum() async {
ApiHelper _helper = ApiHelper();
final response = await _helper.get(baseurl: 'jsonplaceholder.typicode.com', url: 'albums/2');
return Album.fromJson(response);
}
copied to clipboard
Dark Mode #
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: FcTheme.light,
darkTheme: FcTheme.dark,
themeMode: ThemeMode.system,
home: MyHomePage(),
);
}
}
copied to clipboard

Text Style #
FcTextStyle textStyle = FcTextStyle();
ElevatedButton(
onPressed: () {},
child: Text(
'move to second page',
style: textStyle.buttonText(context),
),
)
copied to clipboard
Text Format #
Text(
"data join".capitalizeFirstOfEach,
style: textStyle.h6Text(context),
)
copied to clipboard
Dimensions #
// Vertical
fcVSizedBox
fcVSizedBox1
fcVSizedBox2
fcVSizedBox3
fcVSizedBox4
fcVSizedBox5
fcVSizedBox6

// Horizantel
fcHSizedBox
fcHSizedBox1
fcHSizedBox2
fcHSizedBox3
fcHSizedBox4
fcHSizedBox5
fcHSizedBox6
copied to clipboard
The base sized is 5 and the rest of the double the previous one
Navigations #
FcNavigator().push(context, screen: SecondPage());
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.