jamesblasco / zflutter

Flat, round, designer-friendly pseudo-3D engine for Flutter
https://z.flutter.gallery
MIT License
272 stars 76 forks source link

I get the following error when I run the example code #7

Open ghost opened 3 years ago

ghost commented 3 years ago
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
marcoredz commented 2 years ago

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:

IgnaceMaes commented 1 year ago

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