search update

This commit is contained in:
Phaung Phaung
2021-09-13 11:10:17 +06:30
parent 5346cd10c5
commit 966ad16572
9 changed files with 31 additions and 14 deletions

View File

@@ -31,13 +31,16 @@ class PartSearchDelegate extends SearchDelegate<Carton> {
ThemeData appBarTheme(BuildContext context) {
final ThemeData theme = Theme.of(context);
return theme.copyWith(
appBarTheme: AppBarTheme(color: primaryColor),
inputDecorationTheme: InputDecorationTheme(
border: InputBorder.none,
hintStyle: TextStyle(
color: theme.primaryTextTheme.caption!.color, fontSize: 14)),
textTheme: theme.textTheme.copyWith(
title: theme.textTheme.title!.copyWith(
color: theme.primaryTextTheme.title!.color, fontSize: 16)),
color: theme.primaryTextTheme.caption?.color, fontSize: 14)),
textTheme: TextTheme(
headline1: TextStyle(
color: theme.primaryTextTheme.headline1?.color,
fontSize: 16,
backgroundColor: primaryColor)),
primaryColor: primaryColor,
);
}

View File

@@ -60,7 +60,7 @@ class DeliveryAddressModel extends BaseModel {
Future<DeliveryAddress> getDeliveryAddress(String id) async {
String path = "/$user_collection/${user!.id}/$delivery_address_collection";
var snap = await FirebaseFirestore.instance.collection(path).doc(id).get();
return DeliveryAddress.fromMap(snap.data as Map<String, dynamic>, snap.id);
return DeliveryAddress.fromMap(snap.data()!, snap.id);
}
void initUser(user) {

View File

@@ -193,7 +193,6 @@ class _PackageInfoState extends State<PackageInfo> {
}
_changeDeliverayAddress(DeliveryAddress deliveryAddress) async {
if (deliveryAddress == null) return;
setState(() {
_isLoading = true;
});

View File

@@ -29,13 +29,16 @@ class PackageSearchDelegate extends SearchDelegate<Package> {
ThemeData appBarTheme(BuildContext context) {
final ThemeData theme = Theme.of(context);
return theme.copyWith(
appBarTheme: AppBarTheme(color: primaryColor),
inputDecorationTheme: InputDecorationTheme(
border: InputBorder.none,
hintStyle: TextStyle(
color: theme.primaryTextTheme.caption!.color, fontSize: 14)),
textTheme: theme.textTheme.copyWith(
title: theme.textTheme.title!.copyWith(
color: theme.primaryTextTheme.title!.color, fontSize: 16)),
color: theme.primaryTextTheme.caption?.color, fontSize: 14)),
textTheme: TextTheme(
headline1: TextStyle(
color: theme.primaryTextTheme.headline1?.color,
fontSize: 16,
backgroundColor: primaryColor)),
primaryColor: primaryColor,
);
}

View File

@@ -231,6 +231,11 @@ class _ReceivingEditorState extends State<ReceivingEditor> {
showMsgDialog(context, "Error", "Invalid tracking ID!");
return;
}
if (user == null) {
showMsgDialog(context, "Error", "Please select FCS ID");
return;
}
setState(() {
_isLoading = true;
});

View File

@@ -29,13 +29,16 @@ class UserSearchDelegate extends SearchDelegate<User> {
ThemeData appBarTheme(BuildContext context) {
final ThemeData theme = Theme.of(context);
return theme.copyWith(
appBarTheme: AppBarTheme(color: primaryColor),
inputDecorationTheme: InputDecorationTheme(
border: InputBorder.none,
hintStyle: TextStyle(
color: theme.primaryTextTheme.caption?.color, fontSize: 14)),
textTheme: theme.textTheme.copyWith(
title: theme.textTheme.title?.copyWith(
color: theme.primaryTextTheme.title?.color, fontSize: 16)),
textTheme: TextTheme(
headline1: TextStyle(
color: theme.primaryTextTheme.headline1?.color,
fontSize: 16,
backgroundColor: primaryColor)),
primaryColor: primaryColor,
);
}

View File

@@ -2,6 +2,8 @@
// Generated file. Do not edit.
//
// clang-format off
#include "generated_plugin_registrant.h"
#include <url_launcher_linux/url_launcher_plugin.h>

View File

@@ -2,6 +2,8 @@
// Generated file. Do not edit.
//
// clang-format off
#ifndef GENERATED_PLUGIN_REGISTRANT_
#define GENERATED_PLUGIN_REGISTRANT_