tecfy_basic_package 1.2.13 tecfy_basic_package: ^1.2.13 copied to clipboard
Package includes all components and services used on most applications.
import 'package:example/employee/employee_form.page.dart';
import 'package:example/employee/employee_list.page.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:tecfy_basic_package/tecfy_basic_package.dart';
import 'package:lifecycle/lifecycle.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
navigatorObservers: [defaultLifecycleObserver],
title: 'My Application',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(title: 'My Application'),
);
}
}
class MyHomePage extends StatefulWidget {
final String? title;
MyHomePage({Key? key, this.title}) : super(key: key);
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title ?? "Default"),
),
body: Center(
child: Column(
children: <Widget>[
AppButtonIconText(
icon: Icon(Icons.add),
label: 'Employess Page',
onPressed: () async {
AppNavigator.navigateTo(context, () => EmployeeListPage());
},
)
],
),
),
);
}
}