refactor: Make layouts null safe
This commit is contained in:
parent
088424af77
commit
d3e25f84cf
6 changed files with 36 additions and 27 deletions
|
|
@ -1,3 +1,4 @@
|
|||
//@dart=2.12
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:fluffychat/config/themes.dart';
|
||||
|
|
@ -6,9 +7,11 @@ class TwoColumnLayout extends StatelessWidget {
|
|||
final Widget mainView;
|
||||
final Widget sideView;
|
||||
|
||||
const TwoColumnLayout(
|
||||
{Key key, @required this.mainView, @required this.sideView})
|
||||
: super(key: key);
|
||||
const TwoColumnLayout({
|
||||
Key? key,
|
||||
required this.mainView,
|
||||
required this.sideView,
|
||||
}) : super(key: key);
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (MediaQuery.of(context).size.width <= FluffyThemes.columnWidth * 2) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue