Coder Social home page Coder Social logo

Comments (6)

hukjordanjanaq avatar hukjordanjanaq commented on July 29, 2024 15

Hi, i used a pull request. In the pubspec.yaml, i change for this:
flutter_inner_drawer: git: url: https://github.com/kenjishiromajp/flutter_inner_drawer ref: kenjishiromajp-update-for-2.12-null-safety-casting

Captura de Pantalla 2021-09-11 a la(s) 10 05 19

from flutter_inner_drawer.

swiftdev69 avatar swiftdev69 commented on July 29, 2024

hello @jordanjanaq did you get any solutiion?

from flutter_inner_drawer.

swiftdev69 avatar swiftdev69 commented on July 29, 2024

Hi, i used a pull request. In the pubspec.yaml, i change for this:
flutter_inner_drawer: git: url: https://github.com/kenjishiromajp/flutter_inner_drawer ref: kenjishiromajp-update-for-2.12-null-safety-casting

Captura de Pantalla 2021-09-11 a la(s) 10 05 19

This worked for me.

from flutter_inner_drawer.

Wentris71 avatar Wentris71 commented on July 29, 2024

thx, solution worked like a charm.

from flutter_inner_drawer.

kksys avatar kksys commented on July 29, 2024

I've encountered this issue.
And, this solution is worked for me.

from flutter_inner_drawer.

yeasin50 avatar yeasin50 commented on July 29, 2024

The issue is coming from

children: <Widget?>[widget.scaffold, invC != null ? invC : null]
.where((a) => a != null)
.toList() as List<Widget>,

children doesn't accept any nullable widget.

Also _trigger(..) method returning nullable widget

Widget? _trigger(AlignmentDirectional alignment, Widget? child) {
assert(alignment != null);
final bool drawerIsStart = _position == InnerDrawerDirection.start;
final EdgeInsets padding = MediaQuery.of(context).padding;
double dragAreaWidth = drawerIsStart ? padding.left : padding.right;
if (Directionality.of(context) == TextDirection.rtl)
dragAreaWidth = drawerIsStart ? padding.right : padding.left;
dragAreaWidth = max(dragAreaWidth, _kEdgeDragWidth);
if (_controller.status == AnimationStatus.completed &&
_swipe &&
child != null)
return Align(
alignment: alignment,
child: Container(color: Colors.transparent, width: dragAreaWidth),
);
else
return null;
}

And It is being used on
children: <Widget?>[
///Gradient
Container(
width: _controller.value == 0 ||
_animationType == InnerDrawerAnimation.linear
? 0
: null,
color: _colorTransitionChild.evaluate(_controller),
),
Align(
alignment: _drawerOuterAlignment!,
child: Align(
alignment: _drawerInnerAlignment!,
widthFactor: wFactor,
child: RepaintBoundary(child: _scaffold())),
),
///Trigger
_trigger(AlignmentDirectional.centerStart, _leftChild),
_trigger(AlignmentDirectional.centerEnd, _rightChild),
].where((a) => a != null).toList() as List<Widget>,

While the children can't be null anymore, we can remove or replace _trigger() widget when it returns null.

from flutter_inner_drawer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.