nb_utils 3.3.4-nullsafety nb_utils: ^3.3.4-nullsafety copied to clipboard
This package helps you daily usable function with ease. Just add nb_utils with its latest version and that's it you are ready to use.
import 'package:flutter/material.dart';
import 'package:nb_utils/nb_utils.dart';
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
initialize();
}
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Utils Example',
debugShowCheckedModeBanner: false,
theme: ThemeData(primaryColor: whiteColor),
home: HomePage(),
);
}
}
class HomePage extends StatefulWidget {
@override
_HomePageState createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
body: Container(
padding: EdgeInsets.all(16),
child: Column(
children: <Widget>[
UL(
symbolType: SymbolType.Numbered,
children: [
Text('Hi', style: primaryTextStyle()),
Text('Hello', style: primaryTextStyle()),
Text('How are you?', style: primaryTextStyle()),
],
),
AppTextField(
controller: TextEditingController(),
textFieldType: TextFieldType.EMAIL,
decoration: InputDecoration(),
),
8.height,
AppButton(
text: 'Save',
onTap: () {
//
},
),
8.height,
SettingItemWidget(
title: 'Setting',
onTap: () {},
leading: Icon(Icons.ac_unit),
),
],
),
).onTap(() {
HomePage().launch(context);
}),
),
);
}
}