fix null safety error

hmxc
小赖 4 years ago
parent fedce02381
commit 6d14b8631c

@ -85,7 +85,7 @@ class _FixedSubmitPageState extends State<FixedSubmitPage> {
curve: Curves.easeInOutCubic, curve: Curves.easeInOutCubic,
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
Get.to(() => FixedDetailPage(model.id)); Get.to(() => FixedDetailPage(model.id ?? 0));
}, },
child: Container( child: Container(
width: 686.w, width: 686.w,

@ -21,7 +21,7 @@ import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/views/horizontal_image_view.dart'; import 'package:aku_community/widget/views/horizontal_image_view.dart';
class FixedDetailPage extends StatefulWidget { class FixedDetailPage extends StatefulWidget {
final int? id; final int id;
FixedDetailPage( FixedDetailPage(
this.id, { this.id, {
Key? key, Key? key,
@ -220,7 +220,8 @@ class _FixedDetailPageState extends State<FixedDetailPage> {
...model.appProcessRecordVo! ...model.appProcessRecordVo!
.map((e) => Row( .map((e) => Row(
children: [ children: [
BeeMap.processClass[e.operationType!]!.text (BeeMap.processClass[e.operationType ?? 0] ?? '')
.text
.color(ktextSubColor) .color(ktextSubColor)
.size(28.sp) .size(28.sp)
.make(), .make(),

@ -16,6 +16,7 @@ class BeeMap {
}; };
static Map<int, String> processClass = { static Map<int, String> processClass = {
0: '未知',
1: '报修时间', 1: '报修时间',
2: '管家分派', 2: '管家分派',
3: '师傅接单', 3: '师傅接单',

Loading…
Cancel
Save