null safety

This commit is contained in:
phyothandar
2021-09-10 14:25:37 +06:30
parent 5a313d641e
commit 079c9a135d
31 changed files with 230 additions and 227 deletions

View File

@@ -4,10 +4,10 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class LocalTitle extends StatelessWidget {
final String textKey;
final Widget trailing;
final String? textKey;
final Widget? trailing;
const LocalTitle({Key key, this.textKey, this.trailing}) : super(key: key);
const LocalTitle({Key? key, this.textKey, this.trailing}) : super(key: key);
@override
Widget build(BuildContext context) {
@@ -20,13 +20,13 @@ class LocalTitle extends StatelessWidget {
children: [
LocalText(
context,
textKey,
textKey!,
fontSize: 20,
fontWeight: FontWeight.bold,
color: primaryColor,
),
trailing != null ? Spacer() : Container(),
trailing != null ? trailing : Container()
trailing != null ? trailing! : Container()
],
),
),