From d22f841a0883b576ad6d58a99cc4a6f3dbe5c3f6 Mon Sep 17 00:00:00 2001 From: bikram Date: Thu, 27 May 2021 23:33:52 +0545 Subject: [PATCH] Fix type cast using 'whereType' instead of 'as' operator --- lib/inner_drawer.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/inner_drawer.dart b/lib/inner_drawer.dart index a2cb9e2..23fbada 100644 --- a/lib/inner_drawer.dart +++ b/lib/inner_drawer.dart @@ -434,7 +434,8 @@ class InnerDrawerState extends State final Widget scaffoldChild = Stack( children: [widget.scaffold, invC != null ? invC : null] .where((a) => a != null) - .toList() as List, + .whereType() + .toList(), ); Widget container = Container( @@ -617,7 +618,7 @@ class InnerDrawerState extends State ///Trigger _trigger(AlignmentDirectional.centerStart, _leftChild), _trigger(AlignmentDirectional.centerEnd, _rightChild), - ].where((a) => a != null).toList() as List, + ].where((a) => a != null).whereType().toList(), ), ), ),