diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 9c178e2..1a811b0 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -6,7 +6,7 @@ plugins { } android { - namespace = "com.example.gemi_invoice" + namespace = "com.example.h_1" compileSdk = flutter.compileSdkVersion ndkVersion = flutter.ndkVersion @@ -21,7 +21,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId = "com.example.gemi_invoice" + applicationId = "com.example.h_1" // You can update the following values to match your application needs. // For more information, see: https://flutter.dev/to/review-gradle-config. minSdk = flutter.minSdkVersion diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 80f01e4..ff12c06 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ @@ -31,7 +31,7 @@ diff --git a/android/app/src/main/kotlin/com/example/gemi_invoice/MainActivity.kt b/android/app/src/main/kotlin/com/example/h_1/MainActivity.kt similarity index 73% rename from android/app/src/main/kotlin/com/example/gemi_invoice/MainActivity.kt rename to android/app/src/main/kotlin/com/example/h_1/MainActivity.kt index b2b225e..c7fda65 100644 --- a/android/app/src/main/kotlin/com/example/gemi_invoice/MainActivity.kt +++ b/android/app/src/main/kotlin/com/example/h_1/MainActivity.kt @@ -1,4 +1,4 @@ -package com.example.gemi_invoice +package com.example.h_1 import io.flutter.embedding.android.FlutterActivity diff --git a/lib/screens/invoice_input_screen.dart b/lib/screens/invoice_input_screen.dart index 1d96357..b3d1c42 100644 --- a/lib/screens/invoice_input_screen.dart +++ b/lib/screens/invoice_input_screen.dart @@ -10,6 +10,7 @@ import '../widgets/invoice_pdf_preview_page.dart'; import 'invoice_detail_page.dart'; import '../services/gps_service.dart'; import 'customer_picker_modal.dart'; +import 'customer_master_screen.dart'; import 'product_picker_modal.dart'; import '../models/company_model.dart'; import '../services/company_repository.dart'; @@ -30,6 +31,7 @@ class InvoiceInputForm extends StatefulWidget { class _InvoiceInputFormState extends State { final _repository = InvoiceRepository(); + final InvoiceRepository _invoiceRepo = InvoiceRepository(); Customer? _selectedCustomer; final List _items = []; double _taxRate = 0.10; @@ -214,40 +216,52 @@ class _InvoiceInputFormState extends State { final fmt = NumberFormat("#,###"); final themeColor = Colors.white; final textColor = Colors.black87; + final bottomInset = MediaQuery.of(context).viewInsets.bottom; return Scaffold( backgroundColor: themeColor, + resizeToAvoidBottomInset: true, appBar: AppBar( leading: const BackButton(), - title: const Text("販売アシスト1号 V1.5.06"), + title: const Text("販売アシスト1号 V1.5.08"), ), body: Stack( children: [ - Column( - children: [ - Expanded( - child: SingleChildScrollView( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - _buildDateSection(), - const SizedBox(height: 16), - _buildCustomerSection(), - const SizedBox(height: 16), - _buildSubjectSection(textColor), - const SizedBox(height: 20), - _buildItemsSection(fmt), - const SizedBox(height: 20), - _buildSummarySection(fmt), - const SizedBox(height: 20), - _buildSignatureSection(), - ], + AnimatedPadding( + duration: const Duration(milliseconds: 200), + padding: EdgeInsets.only(bottom: bottomInset), + child: InteractiveViewer( + panEnabled: false, + minScale: 0.8, + maxScale: 2.5, + clipBehavior: Clip.none, + child: Column( + children: [ + Expanded( + child: SingleChildScrollView( + padding: EdgeInsets.fromLTRB(16, 16, 16, 140 + bottomInset), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + _buildDateSection(), + const SizedBox(height: 16), + _buildCustomerSection(), + const SizedBox(height: 16), + _buildSubjectSection(textColor), + const SizedBox(height: 20), + _buildItemsSection(fmt), + const SizedBox(height: 20), + _buildSummarySection(fmt), + const SizedBox(height: 20), + _buildSignatureSection(), + ], + ), + ), ), - ), + _buildBottomActionBar(), + ], ), - _buildBottomActionBar(), - ], + ), ), if (_isSaving) Container( @@ -314,17 +328,16 @@ class _InvoiceInputFormState extends State { subtitle: const Text("顧客マスターから選択"), // 修正 trailing: const Icon(Icons.chevron_right), onTap: () async { - await showModalBottomSheet( - context: context, - isScrollControlled: true, - builder: (context) => FractionallySizedBox( - heightFactor: 0.9, - child: CustomerPickerModal(onCustomerSelected: (c) { - setState(() => _selectedCustomer = c); - Navigator.pop(context); - }), + final Customer? picked = await Navigator.push( + context, + MaterialPageRoute( + builder: (_) => CustomerMasterScreen(selectionMode: true), + fullscreenDialog: true, ), ); + if (picked != null) { + setState(() => _selectedCustomer = picked); + } }, ), ); diff --git a/pubspec.yaml b/pubspec.yaml index b8e3fb0..6253e21 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,4 +1,4 @@ -name: gemi_invoice +name: h_1 description: "A new Flutter project." # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. @@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.5.07+152 +version: 1.5.08+153 environment: sdk: ^3.10.7