After flutter upgrade, I've got this error
/C:/Users/user/AppData/Local/Pub/Cache/hosted/pub.dev/division-0.9.0/lib/src/build.dart:100:48: Error: The argument type 'BorderRadius?' can't be assigned to the parameter type 'BorderRadiusGeometry' because 'BorderRadius?' is nullable and 'BorderRadiusGeometry' isn't.
-
'BorderRadius' is from 'package:flutter/src/painting/border_radius.dart' ('/D:/src/flutter/packages/flutter/lib/src/painting/border_radius.dart'). border_radius.dart:1
-
'BorderRadiusGeometry' is from 'package:flutter/src/painting/border_radius.dart' ('/D:/src/flutter/packages/flutter/lib/src/painting/border_radius.dart'). border_radius.dart:1 borderRadius: decoration?.borderRadius as BorderRadius?, ^
Target kernel_snapshot failed: Exception
After upgrading Flutter to 3.13.6 from 3.7.1, I get the same error
@just-abdul1ah I got around this by just modifying the build.dart file from the flutter cache, allowing me to build it. I'd suggest this as a workaround. I'll submit a pull request when I can get round to it.
Basically, you need to add a default wherever BorderRadius? is used: youruserfolder\AppData\Local\Pub\Cache\hosted\pub.dev\division-0.9.0\lib\src\build.dart
Replace all instances of
BorderRadius?,
with
BorderRadius? ?? BorderRadius.circular(0.0),
I have no idea if the constant I used is suitable for all scenarios, but alternatively you could use: BorderRadius ?? BorderRadius.zero,