jamesblasco / zflutter

Flat, round, designer-friendly pseudo-3D engine for Flutter

Home Page:https://z.flutter.gallery

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I get the following error when I run the example code

George35mk opened this issue · comments

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:

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