存档
11月 2021
显示总共30条中的前3条
There should be exactly one item with [DropdownButton]'s value: disabled.
Either zero or 2 or more [DropdownMenuItem]s were detected with the same value
'package:flutter/src/material/dropdown.dart':
package:flutter/…/material/dropdown.dart:1
Widget _buildCheckBox(_product) { bool? _productStatus; if (_productStatus == null) { _productStatus = _product.status == 'enabled' ? true : false; } return StatefulBuilder( builder: (BuildContext context, StateSetter setState) { return Checkbox( value: _productStatus, activeColor: Theme.of(context).primaryColor, onChanged: (_value) async { if (_value != null) { setState(() { _productStatus = _value; }); Map<String, dynamic> _params = { 'product_id': _product.id, 'merchant_id': _product.merchantId, 'status': _value ? 'enabled' : 'disabled', }; await Provider.of(context, listen: false) .updateProductStatus(_params) .then((_) { if (Provider.of(context, listen: false) .errorMsg == null) { String _result = _value ? '上线' : '下线'; ScaffoldMessenger.of(context) .showSnackBar(SnackBar(content: Text('产品已经$_result'))); } else { ScaffoldMessenger.of(context) .showSnackBar(SnackBar(content: Text('产品状态更新失败'))); } }); } }); });} builder: (BuildContext context, StateSetter setState) {})Dart DevTools exited with code 65.
Pubspec for activated package amap_map_fluttify didn't contain an entry for itself.
package:pub/src/global_packages.dart 463:7 GlobalPackages._loadPackageId
dart:_internal ListIterable.toList
package:pub/src/global_packages.dart 445:45 GlobalPackages.listActivePackages
package:pub/src/command/global_list.dart 22:13 GlobalListCommand.runProtected
dart:async new Future.sync
package:pub/src/utils.dart 112:12 captureErrors.wrappedCallback
dart:async runZonedGuarded
package:pub/src/utils.dart 129:5 captureErrors
package:pub/src/command.dart 168:13 PubCommand.run
package:args/command_runner.dart 209:27 CommandRunner.runCommand
package:dartdev/dartdev.dart 202:30 DartdevRunner.runCommand
package:args/command_runner.dart 119:25 CommandRunner.run.
dart:async new Future.sync
package:args/command_runner.dart 119:14 CommandRunner.run
package:dartdev/dartdev.dart 54:29 runDartdev
C:\b\s\w\ir\cache\builder\sdk\pkg\dartdev\bin\dartdev.dart 11:9 main
This is an unexpected error. Please run
dart pub --trace pub global list
and include the logs in an issue on https://github.com/dart-lang/pub/issues/new