null safety
This commit is contained in:
@@ -6,13 +6,13 @@ import 'package:flutter/material.dart';
|
||||
import 'callbacks.dart';
|
||||
|
||||
class LocalButton extends StatelessWidget {
|
||||
final CallBack callBack;
|
||||
final IconData iconData;
|
||||
final String textKey;
|
||||
final Color color;
|
||||
final CallBack? callBack;
|
||||
final IconData? iconData;
|
||||
final String? textKey;
|
||||
final Color? color;
|
||||
|
||||
const LocalButton(
|
||||
{Key key,
|
||||
{Key? key,
|
||||
this.callBack,
|
||||
this.iconData,
|
||||
this.textKey,
|
||||
@@ -33,7 +33,7 @@ class LocalButton extends StatelessWidget {
|
||||
minWidth: 900.0,
|
||||
height: 100.0,
|
||||
child: FlatButton(
|
||||
onPressed: callBack == null ? null : () => callBack(),
|
||||
onPressed: callBack == null ? null : () => callBack!(),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
@@ -48,7 +48,7 @@ class LocalButton extends StatelessWidget {
|
||||
),
|
||||
LocalText(
|
||||
context,
|
||||
textKey,
|
||||
textKey!,
|
||||
color: Colors.white,
|
||||
fontSize: 16,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user