|
|
|
|
|
|
|
|
import 'package:farm_tpf/custom_model/LocationUnit.dart'; |
|
|
import 'package:farm_tpf/custom_model/LocationUnit.dart'; |
|
|
import 'package:farm_tpf/data/repository/repository.dart'; |
|
|
import 'package:farm_tpf/data/repository/repository.dart'; |
|
|
|
|
|
import 'package:farm_tpf/presentation/custom_widgets/app_bar_widget.dart'; |
|
|
import 'package:farm_tpf/presentation/custom_widgets/bottom_loader.dart'; |
|
|
import 'package:farm_tpf/presentation/custom_widgets/bottom_loader.dart'; |
|
|
import 'package:farm_tpf/presentation/custom_widgets/loading_list_page.dart'; |
|
|
import 'package:farm_tpf/presentation/custom_widgets/loading_list_page.dart'; |
|
|
import 'package:farm_tpf/presentation/screens/location_unit/widget_search.dart'; |
|
|
import 'package:farm_tpf/presentation/screens/location_unit/widget_search.dart'; |
|
|
|
|
|
|
|
|
@override |
|
|
@override |
|
|
Widget build(BuildContext context) { |
|
|
Widget build(BuildContext context) { |
|
|
return Scaffold( |
|
|
return Scaffold( |
|
|
|
|
|
backgroundColor: Colors.white, |
|
|
key: _scaffoldKey, |
|
|
key: _scaffoldKey, |
|
|
appBar: AppBar(title: Text("Chọn $titleName")), |
|
|
|
|
|
|
|
|
appBar: AppBarWidget(), |
|
|
body: Column( |
|
|
body: Column( |
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
children: <Widget>[ |
|
|
children: <Widget>[ |
|
|
|
|
|
Padding( |
|
|
|
|
|
padding: const EdgeInsets.all(8.0), |
|
|
|
|
|
child: Text( |
|
|
|
|
|
'$titleName', |
|
|
|
|
|
style: TextStyle(fontWeight: FontWeight.w500, fontSize: 22), |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
WidgetSearchLocation( |
|
|
WidgetSearchLocation( |
|
|
filterId: filterId, |
|
|
filterId: filterId, |
|
|
type: type, |
|
|
type: type, |
|
|
|
|
|
|
|
|
@override |
|
|
@override |
|
|
Widget build(BuildContext context) { |
|
|
Widget build(BuildContext context) { |
|
|
return GestureDetector( |
|
|
return GestureDetector( |
|
|
child: Card( |
|
|
|
|
|
child: Material( |
|
|
|
|
|
|
|
|
child: Container( |
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
border: |
|
|
|
|
|
Border(bottom: BorderSide(color: Colors.grey, width: 0.35))), |
|
|
child: RadioListTile( |
|
|
child: RadioListTile( |
|
|
title: Text("${item.name}"), |
|
|
title: Text("${item.name}"), |
|
|
value: item, |
|
|
value: item, |
|
|
|
|
|
|
|
|
onChanged: (LocationUnit value) { |
|
|
onChanged: (LocationUnit value) { |
|
|
Navigator.of(context).pop(value); |
|
|
Navigator.of(context).pop(value); |
|
|
}), |
|
|
}), |
|
|
)), |
|
|
|
|
|
|
|
|
), |
|
|
onTap: () {}); |
|
|
onTap: () {}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |