cdharris / flutter_duration_picker

A Flutter Widget for allowing a user to pick a duration (e.g. 5mins, 1h 30mins, etc)
MIT License
78 stars 49 forks source link

Clock Circle is always painted white even in dark mode . #10

Closed Aman-Malhotra closed 5 years ago

Aman-Malhotra commented 5 years ago

The clock circle being painted in your flutter_duration_picker.dart file is always white in color even when I change the brightness in ThemeData to Brightness.dark. In the flutter_duration_picket.dart file inside the CustomPainter class named _DialPainter inside paint overridden function see this code ( Images attatched are in Brightness.dark mode )

// Draw the inner background circle
    canvas.drawCircle(centerPoint, radius * 0.88,
        new Paint()..color = Colors.white); 

screenshot_20181224-004628 change this code to

// Draw the inner background circle
    canvas.drawCircle(centerPoint, radius * 0.88,
        new Paint()..color = Theme.of(context).canvasColor);

screenshot_20181224-004652 so that the color of clock background depends on the theme of the app i.e if the app is in Dark theme or in Light theme( brightness in ThemeData).

aravind816 commented 5 years ago

When this bug will be closed ?

aravind816 commented 5 years ago

Thanks

nohli commented 5 years ago

So, you fixed this six months ago, but the latest package version is from eight months ago...so how are users able to easily import your package in pubspec.yaml?

cyberpwnn commented 4 years ago

Just paste the source code into a random file in your project and replace the line specified above, then remove the package from your pubspec.

nohli commented 4 years ago

@cyberpwnn thanks

Or one could add the following to pubspec.yaml dependencies (for the latest commit):

  flutter_duration_picker:
    git:
      url: https://github.com/cdharris/flutter_duration_picker
      ref: a44d26