This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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), | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class StepperBloc extends Bloc<StepperEvent, StepperState> { | |
void onContinue() { | |
dispatch(ContinueEvent()); | |
} | |
void onBack() { | |
dispatch(BackEvent()); | |
} | |
void onSaveRate(double rate, double volume) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class StepperEvent { | |
} | |
class ContinueEvent extends StepperEvent {} | |
class BackEvent extends StepperEvent {} | |
class SaveRateEvent extends StepperEvent { | |
final double rate; | |
final double volume; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |