add swipe patient manager
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
import 'package:flutter_swipe_detector/flutter_swipe_detector.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@@ -645,7 +646,24 @@ class _PatientManagerState extends State<PatientManager> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MIHLayoutBuilder(
|
return SwipeDetector(
|
||||||
|
onSwipeLeft: (offset) {
|
||||||
|
if (_selectedIndex < 2) {
|
||||||
|
setState(() {
|
||||||
|
_selectedIndex += 1;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//print("swipe left");
|
||||||
|
},
|
||||||
|
onSwipeRight: (offset) {
|
||||||
|
if (_selectedIndex > 0) {
|
||||||
|
setState(() {
|
||||||
|
_selectedIndex -= 1;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//print("swipe right");
|
||||||
|
},
|
||||||
|
child: MIHLayoutBuilder(
|
||||||
actionButton: getActionButton(),
|
actionButton: getActionButton(),
|
||||||
header: getHeader(),
|
header: getHeader(),
|
||||||
secondaryActionButton: null,
|
secondaryActionButton: null,
|
||||||
@@ -655,6 +673,7 @@ class _PatientManagerState extends State<PatientManager> {
|
|||||||
bottomNavBar: null,
|
bottomNavBar: null,
|
||||||
pullDownToRefresh: false,
|
pullDownToRefresh: false,
|
||||||
onPullDown: () async {},
|
onPullDown: () async {},
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user