如何通过 themedata 将 sideBorder 实现为levedButton。在此输入图像描述
elevatedButtonTheme: ElevatedButtonThemeData(
style: ButtonStyle(side: MaterialStateProperty<BorderSide>//Stuck here),
),
Run Code Online (Sandbox Code Playgroud) 我试图在配置单元数据库中存储 Map<String, int>() 。我可以存储但无法检索它提示错误的 Map()
Unhandled Exception: type '_InternalLinkedHashMap<dynamic, dynamic>' is not a subtype of type 'Map<String, int>?' in type cast
Run Code Online (Sandbox Code Playgroud)
代码:
数据控制者
Box<Map<String, int>> hiveBox = Hive.box('SaveBetBox');
void betStorage({String? matchKey, String? statKey, int? statIndex}) {
// Checks if the hive box has the data with following key if not adds
hiveBox.containsKey(matchKey)
? null
: hiveBox.put(
matchKey,
Map<String, int>(),
);
// Extract hive map to update or add Key values to Map with specific Key
Map<String, int>? tm = hiveBox.get(matchKey); …Run Code Online (Sandbox Code Playgroud)