sdk upgrade changes-1.
parent
7d0a2eb65c
commit
fe8ac14e46
@ -1,36 +1,36 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:test_sa/extensions/context_extension.dart';
|
||||
import 'package:test_sa/new_views/app_style/app_color.dart';
|
||||
|
||||
class AppSearchField extends StatefulWidget {
|
||||
final Function(String) onChanged;
|
||||
final Function(String) onSubmitted;
|
||||
|
||||
const AppSearchField({Key key, this.onChanged, this.onSubmitted}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<AppSearchField> createState() => _AppSearchFieldState();
|
||||
}
|
||||
|
||||
class _AppSearchFieldState extends State<AppSearchField> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return TextField(
|
||||
onChanged: widget.onChanged,
|
||||
onSubmitted: widget.onSubmitted,
|
||||
decoration: InputDecoration(
|
||||
prefixIcon: const Icon(
|
||||
Icons.search,
|
||||
color: AppColor.neutral20,
|
||||
),
|
||||
hintText: context.translation.search,
|
||||
hintStyle: TextStyle(fontSize: Theme.of(context).textTheme.bodySmall.fontSize),
|
||||
filled: true,
|
||||
fillColor: AppColor.neutral30,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
borderSide: BorderSide.none,
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
||||
// import 'package:flutter/material.dart';
|
||||
// import 'package:test_sa/extensions/context_extension.dart';
|
||||
// import 'package:test_sa/new_views/app_style/app_color.dart';
|
||||
//
|
||||
// class AppSearchField extends StatefulWidget {
|
||||
// final Function(String) onChanged;
|
||||
// final Function(String) onSubmitted;
|
||||
//
|
||||
// const AppSearchField({Key? key, this.onChanged, this.onSubmitted}) : super(key: key);
|
||||
//
|
||||
// @override
|
||||
// State<AppSearchField> createState() => _AppSearchFieldState();
|
||||
// }
|
||||
//
|
||||
// class _AppSearchFieldState extends State<AppSearchField> {
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return TextField(
|
||||
// onChanged: widget.onChanged,
|
||||
// onSubmitted: widget.onSubmitted,
|
||||
// decoration: InputDecoration(
|
||||
// prefixIcon: const Icon(
|
||||
// Icons.search,
|
||||
// color: AppColor.neutral20,
|
||||
// ),
|
||||
// hintText: context.translation.search,
|
||||
// hintStyle: TextStyle(fontSize: Theme.of(context).textTheme.bodySmall.fontSize),
|
||||
// filled: true,
|
||||
// fillColor: AppColor.neutral30,
|
||||
// border: OutlineInputBorder(
|
||||
// borderRadius: BorderRadius.circular(15),
|
||||
// borderSide: BorderSide.none,
|
||||
// )),
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
||||
@ -1,89 +1,84 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:test_sa/controllers/providers/api/user_provider.dart';
|
||||
import 'package:test_sa/controllers/providers/settings/setting_provider.dart';
|
||||
import 'package:test_sa/extensions/context_extension.dart';
|
||||
import 'package:test_sa/extensions/int_extensions.dart';
|
||||
import 'package:test_sa/extensions/string_extensions.dart';
|
||||
import 'package:test_sa/extensions/text_extensions.dart';
|
||||
import 'package:test_sa/extensions/widget_extensions.dart';
|
||||
import 'package:test_sa/service_request_latest/views/components/verify_arrival_view.dart';
|
||||
import 'package:test_sa/views/widgets/date_and_time/date_picker.dart';
|
||||
import '../../../../controllers/providers/api/service_requests_provider.dart';
|
||||
import '../../../../new_views/app_style/app_color.dart';
|
||||
import '../../../../new_views/common_widgets/app_filled_button.dart';
|
||||
import '../../../../new_views/common_widgets/app_text_form_field.dart';
|
||||
|
||||
class ActionBottomSheet extends StatelessWidget {
|
||||
final String title;
|
||||
final String button1Text;
|
||||
final String button2Text;
|
||||
final VoidCallback button1Tap;
|
||||
final VoidCallback button2Tap;
|
||||
|
||||
ActionBottomSheet({Key key, @required this.title, this.button1Text, this.button2Text, this.button1Tap, this.button2Tap}) : super(key: key);
|
||||
|
||||
final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Consumer<ServiceRequestsProvider>(builder: (context, serviceRequestProvider, child) {
|
||||
return Wrap(
|
||||
children: [
|
||||
Container(
|
||||
clipBehavior: Clip.antiAlias,
|
||||
margin: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).scaffoldBackgroundColor,
|
||||
borderRadius: const BorderRadius.only(topRight: Radius.circular(20), topLeft: Radius.circular(20)),
|
||||
),
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.toScreenWidth, vertical: 8.toScreenHeight),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Container(
|
||||
width: 40.toScreenWidth,
|
||||
height: 5.toScreenHeight,
|
||||
decoration: BoxDecoration(color: AppColor.neutral40, borderRadius: BorderRadius.circular(30)),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional.centerStart,
|
||||
child: title.heading4(context).custom(fontWeight: FontWeight.w500).paddingOnly(top: 16, bottom: 16),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 200.toScreenHeight,
|
||||
child: AppFilledButton(
|
||||
label: button1Text ?? context.translation.no,
|
||||
loading: false,
|
||||
buttonColor: AppColor.neutral40,
|
||||
textColor: AppColor.black10,
|
||||
onPressed: button1Tap ??
|
||||
() async {
|
||||
Navigator.pop(context);
|
||||
// await snapshot.updateRequest(user: userProvider.user, request: serviceRequestProvider.serviceRequest);
|
||||
// Navigator.pop(context, true);
|
||||
},
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 200.toScreenHeight,
|
||||
child: AppFilledButton(
|
||||
label: context.translation.yes,
|
||||
buttonColor: AppColor.primary10,
|
||||
loading: false,
|
||||
onPressed:button2Tap,
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
// import 'package:flutter/material.dart';
|
||||
// import 'package:provider/provider.dart';
|
||||
// import 'package:test_sa/extensions/context_extension.dart';
|
||||
// import 'package:test_sa/extensions/int_extensions.dart';
|
||||
// import 'package:test_sa/extensions/text_extensions.dart';
|
||||
// import 'package:test_sa/extensions/widget_extensions.dart';
|
||||
//
|
||||
// import '../../../../controllers/providers/api/service_requests_provider.dart';
|
||||
// import '../../../../new_views/app_style/app_color.dart';
|
||||
// import '../../../../new_views/common_widgets/app_filled_button.dart';
|
||||
//
|
||||
// class ActionBottomSheet extends StatelessWidget {
|
||||
// final String title;
|
||||
// final String button1Text;
|
||||
// final String button2Text;
|
||||
// final VoidCallback button1Tap;
|
||||
// final VoidCallback button2Tap;
|
||||
//
|
||||
// ActionBottomSheet({Key? key, required this.title, this.button1Text, this.button2Text, this.button1Tap, this.button2Tap}) : super(key: key);
|
||||
//
|
||||
// final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
|
||||
//
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return Consumer<ServiceRequestsProvider>(builder: (context, serviceRequestProvider, child) {
|
||||
// return Wrap(
|
||||
// children: [
|
||||
// Container(
|
||||
// clipBehavior: Clip.antiAlias,
|
||||
// margin: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
|
||||
// decoration: BoxDecoration(
|
||||
// color: Theme.of(context).scaffoldBackgroundColor,
|
||||
// borderRadius: const BorderRadius.only(topRight: Radius.circular(20), topLeft: Radius.circular(20)),
|
||||
// ),
|
||||
// padding: EdgeInsets.symmetric(horizontal: 16.toScreenWidth, vertical: 8.toScreenHeight),
|
||||
// child: Column(
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
// children: [
|
||||
// Container(
|
||||
// width: 40.toScreenWidth,
|
||||
// height: 5.toScreenHeight,
|
||||
// decoration: BoxDecoration(color: AppColor.neutral40, borderRadius: BorderRadius.circular(30)),
|
||||
// ),
|
||||
// Align(
|
||||
// alignment: AlignmentDirectional.centerStart,
|
||||
// child: title.heading4(context).custom(fontWeight: FontWeight.w500).paddingOnly(top: 16, bottom: 16),
|
||||
// ),
|
||||
// Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
// children: [
|
||||
// SizedBox(
|
||||
// width: 200.toScreenHeight,
|
||||
// child: AppFilledButton(
|
||||
// label: button1Text ?? context.translation.no,
|
||||
// loading: false,
|
||||
// buttonColor: AppColor.neutral40,
|
||||
// textColor: AppColor.black10,
|
||||
// onPressed: button1Tap ??
|
||||
// () async {
|
||||
// Navigator.pop(context);
|
||||
// // await snapshot.updateRequest(user: userProvider.user, request: serviceRequestProvider.serviceRequest);
|
||||
// // Navigator.pop(context, true);
|
||||
// },
|
||||
// ),
|
||||
// ),
|
||||
// SizedBox(
|
||||
// width: 200.toScreenHeight,
|
||||
// child: AppFilledButton(
|
||||
// label: context.translation.yes,
|
||||
// buttonColor: AppColor.primary10,
|
||||
// loading: false,
|
||||
// onPressed: button2Tap,
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// )
|
||||
// ],
|
||||
// );
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue