-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate gallery to null safety (#90)
* migrate gallery to null safety * change the type error * remove @ * change String? to String
- Loading branch information
Showing
6 changed files
with
196 additions
and
211 deletions.
There are no files selected for viewing
24 changes: 11 additions & 13 deletions
24
lib/src/components/gallery/config/brn_basic_gallery_config.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,27 @@ | ||
// @dart=2.9 | ||
|
||
import 'package:flutter/material.dart'; | ||
|
||
abstract class BrnBasicGroupConfig { | ||
//每一个组的标题 | ||
String title; | ||
/// 每一个组的标题 | ||
String? title; | ||
|
||
List<BrnBasicItemConfig> configList; | ||
List<BrnBasicItemConfig>? configList; | ||
|
||
BrnBasicGroupConfig({this.title, @required this.configList}); | ||
BrnBasicGroupConfig({this.title, required this.configList}); | ||
} | ||
|
||
//每一个item的配置接口,定制化的需求可以自己实现相关接口 | ||
/// 每一个 item 的配置接口,定制化的需求可以自己实现相关接口 | ||
abstract class BrnBasicItemConfig { | ||
//该配置的groupIndex | ||
int groupIndex; | ||
/// 该配置的 groupIndex | ||
int? groupIndex; | ||
|
||
//改配置的type信息 | ||
String type; | ||
/// 该配置的 type 信息 | ||
String? type; | ||
|
||
//构建查看详情页的widget | ||
/// 构建查看详情页的 widget | ||
Widget buildDetailWidget(BuildContext context, | ||
List<BrnBasicGroupConfig> allConfig, int groupId, int index); | ||
|
||
//构建简略页的widget | ||
/// 构建简略页的 widget | ||
Widget buildSummaryWidget(BuildContext context, | ||
List<BrnBasicGroupConfig> allConfig, int groupId, int index); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.