You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.7 KiB
Dart
60 lines
1.7 KiB
Dart
import 'package:diplomaticquarterapp/pages/ErService/widgets/StepesWideget.dart';
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'BillAmount.dart';
|
|
import 'PickupLocation.dart';
|
|
import 'SelectTransportationMethod.dart';
|
|
import 'Summary.dart';
|
|
|
|
class AmbulanceRequestIndex extends StatefulWidget {
|
|
@override
|
|
_AmbulanceRequestIndexState createState() => _AmbulanceRequestIndexState();
|
|
}
|
|
|
|
class _AmbulanceRequestIndexState extends State<AmbulanceRequestIndex> {
|
|
|
|
int currentIndex = 0;
|
|
PageController pageController;
|
|
|
|
_changeCurrentTab(int tab) {
|
|
setState(() {
|
|
currentIndex = tab;
|
|
});
|
|
pageController.animateToPage(tab, duration: Duration(milliseconds: 800), curve: Curves.easeOutQuart);
|
|
}
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
pageController = new PageController();
|
|
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return AppScaffold(
|
|
body: Column(
|
|
children: [
|
|
SizedBox(height: 80,),
|
|
Container(
|
|
margin: EdgeInsets.only(left: 12,right: 12),
|
|
child: StepesWidget(index: currentIndex,changeCurrentTab: _changeCurrentTab,)),
|
|
Expanded(
|
|
child: PageView(
|
|
physics: NeverScrollableScrollPhysics(),
|
|
controller: pageController,
|
|
children: <Widget>[
|
|
SelectTransportationMethod(changeCurrentTab: _changeCurrentTab,),
|
|
PickupLocation(changeCurrentTab: _changeCurrentTab,),
|
|
BillAmount(changeCurrentTab: _changeCurrentTab,),
|
|
Summary(changeCurrentTab: _changeCurrentTab,),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|