zflutter
zflutter copied to clipboard
I get the following error when I run the example code
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
zflutter: ^0.0.1+2
return Scaffold(
appBar: AppBar(
title: const Text('Position and planning'),
elevation: 1,
backgroundColor: Colors.orange,
),
body: Container(
child: ZIllustration(
child: ZCircle(
diameter: 80,
stroke: 20,
color: const Color(0xFFCC2255),
),
),
),
);
For solutions, see https://dart.dev/go/unsound-null-safety
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
- package:zflutter
- package:quiver
For solutions, see https://dart.dev/go/unsound-null-safety
It is because of this package doesn't support null safety and most probably your Flutter version is null safety by default. So I think there are two ways:
- Unsound null safety for your project: https://stackoverflow.com/questions/64917744/cannot-run-with-sound-null-safety-because-dependencies-dont-support-null-safety
- Reference the package with a branch supporting null safety: example (found on medium.com):
zflutter:
git:
url: https://github.com/IbrahimTabba/zflutter.git
ref: null-safety
or if you want to use the null safety branch from the creator (I didn't test):
zflutter:
git:
url: https://github.com/jamesblasco/zflutter.git
ref: null_safety
Installing the package from git didn't work for me as the library is in a subfolder. When specifying the path it works:
zflutter:
git:
url: https://github.com/jamesblasco/zflutter.git
ref: null_safety
path: zflutter