修正上架時 Google Play 檢查出的 issue
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
import 'dart:io';
|
||||
import 'dart:convert'; // [修正 1] 必須導入此包才能使用 json.decode
|
||||
// [修正 1] 必須導入此包才能使用 json.decode
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:intl/intl.dart';
|
||||
import '../services/generic_api_service.dart';
|
||||
import '../auth_manager.dart';
|
||||
import 'expense_model.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
|
||||
class ExpenseApiService {
|
||||
final GenericApiService _apiService = GenericApiService();
|
||||
@@ -44,7 +43,7 @@ class ExpenseApiService {
|
||||
);
|
||||
|
||||
// 取得本地檔案名稱
|
||||
String picFileName = "${GenericApiService.BASE_IP}/upload/eis_$db/images/" + file.path.split('/').last;
|
||||
String picFileName = "${GenericApiService.BASE_IP}/upload/eis_$db/images/${file.path.split('/').last}";
|
||||
|
||||
// [修正] index.js 的 multer 配置要求 key 必須是 'file'
|
||||
request.files.add(await http.MultipartFile.fromPath('file', file.path));
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import './expense_model.dart';
|
||||
import '../services/generic_api_service.dart';
|
||||
|
||||
class ExpenseDetail extends StatelessWidget {
|
||||
final ExpenseApply expense;
|
||||
|
||||
@@ -132,7 +132,7 @@ class _ExpenseFormState extends State<ExpenseForm> {
|
||||
// [新增] 類別下拉選單
|
||||
const SizedBox(height: 16),
|
||||
DropdownButtonFormField<String>(
|
||||
value: _selectedExpId,
|
||||
initialValue: _selectedExpId,
|
||||
decoration: const InputDecoration(labelText: "費用類別", border: OutlineInputBorder()),
|
||||
items: _classList.map((c) => DropdownMenuItem(
|
||||
value: c.expId,
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
// 在 expense_model.dart 中修改
|
||||
import '../auth_manager.dart';
|
||||
import '../services/generic_api_service.dart';
|
||||
|
||||
Reference in New Issue
Block a user