Skip to content

Instantly share code, notes, and snippets.

@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async => false,
child : Scaffold(
appBar: AppBar(
title: Text(widget.title),
automaticallyImplyLeading: false,
backgroundColor: Colors.redAccent,
elevation: 0.0,
Widget buildMenu() {
return Container(
color: Colors.white,
child: Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8),
child: Column(
children: [
Padding(
padding: EdgeInsets.all(10.0),
child: Text("Menu", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14.0),),
Widget getMainListViewUI() {
return ListView.builder(
shrinkWrap: true,
padding: EdgeInsets.only(
bottom: 62 + MediaQuery.of(context).padding.bottom,
),
itemCount: listViews.length,
scrollDirection: Axis.vertical,
itemBuilder: (context, index) {
return listViews[index];
CREATE TABLE public."MasterEmployee"
(
"ID" serial,
"FirstName" character varying(30),
"LastName" character varying(30),
"Address" character varying(200),
"Email" character varying(30),
"PhoneNumber" character varying(12)
);
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
final bloc = StepperBloc();
return BlocProvider(
bloc: bloc,
child: Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
class StepperBloc extends Bloc<StepperEvent, StepperState> {
void onContinue() {
dispatch(ContinueEvent());
}
void onBack() {
dispatch(BackEvent());
}
void onSaveRate(double rate, double volume) {
abstract class StepperEvent {
}
class ContinueEvent extends StepperEvent {}
class BackEvent extends StepperEvent {}
class SaveRateEvent extends StepperEvent {
final double rate;
final double volume;
class StepperState {
final int currentStep;
final double rate;
final double volume;
const StepperState({this.currentStep, this.rate, this.volume});
factory StepperState.initial() => StepperState(currentStep: 0);
}
name: stepper_content_widget_bloc
description: A new Flutter project.
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
Widget _typeStep() => Container(
child: Stepper(
controlsBuilder: (BuildContext context, {VoidCallback onStepContinue, VoidCallback onStepCancel}) {
return Padding(
padding: EdgeInsets.all(8.0),
child: RaisedButton(
onPressed: () {
setState(() {
currentStep < spr.length - 1 ? currentStep += 1 : currentStep = 0;