add swipe to business profile
This commit is contained in:
@@ -2,6 +2,7 @@ import 'dart:convert';
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:flutter_swipe_detector/flutter_swipe_detector.dart';
|
||||||
import 'package:patient_manager/mih_packages/manage_business/business_details.dart';
|
import 'package:patient_manager/mih_packages/manage_business/business_details.dart';
|
||||||
import 'package:patient_manager/mih_components/mih_layout/mih_action.dart';
|
import 'package:patient_manager/mih_components/mih_layout/mih_action.dart';
|
||||||
import 'package:patient_manager/mih_components/mih_layout/mih_body.dart';
|
import 'package:patient_manager/mih_components/mih_layout/mih_body.dart';
|
||||||
@@ -435,7 +436,24 @@ class _ManageBusinessProfileState extends State<ManageBusinessProfile> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MIHLayoutBuilder(
|
return SwipeDetector(
|
||||||
|
onSwipeLeft: (offset) {
|
||||||
|
if (selectionIndex < 2) {
|
||||||
|
setState(() {
|
||||||
|
selectionIndex += 1;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//print("swipe left");
|
||||||
|
},
|
||||||
|
onSwipeRight: (offset) {
|
||||||
|
if (selectionIndex > 0) {
|
||||||
|
setState(() {
|
||||||
|
selectionIndex -= 1;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//print("swipe right");
|
||||||
|
},
|
||||||
|
child: MIHLayoutBuilder(
|
||||||
actionButton: getActionButton(),
|
actionButton: getActionButton(),
|
||||||
secondaryActionButton: null,
|
secondaryActionButton: null,
|
||||||
header: getHeader(),
|
header: getHeader(),
|
||||||
@@ -445,6 +463,7 @@ class _ManageBusinessProfileState extends State<ManageBusinessProfile> {
|
|||||||
bottomNavBar: null,
|
bottomNavBar: null,
|
||||||
pullDownToRefresh: false,
|
pullDownToRefresh: false,
|
||||||
onPullDown: () async {},
|
onPullDown: () async {},
|
||||||
|
),
|
||||||
);
|
);
|
||||||
// return Scaffold(
|
// return Scaffold(
|
||||||
// // appBar: const MIHAppBar(
|
// // appBar: const MIHAppBar(
|
||||||
|
|||||||
Reference in New Issue
Block a user