An API wrapper of DockProgress for Flutter, make you able to interacting with macOS dock icon progress bars in Flutter.
See example.
import 'package:macos_dock_progress/macos_dock_progress.dart';
void main() async {
await DockProgress.resetProgress();
await DockProgress.setProgress(0.5);
print(await DockProgress.getProgress());
await DockProgress.changeStyle(ProgressBarStyle.bar());
await DockProgress.changeStyle(ProgressBarStyle.squircle(color: Colors.red));
await DockProgress.changeStyle(ProgressBarStyle.circle(radius: 50));
await DockProgress.changeStyle(ProgressBarStyle.badge(30));
}
If you are experiencing Swift compile failed issues, please follow the instructions below.
MACOSX_DEPLOYMENT_TARGET
) for Pod# macos/Podfile
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_macos_build_settings(target)
# Add lines below
target.build_configurations.each do |config|
config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '10.14' # >=10.13
end
end
end
macos/Runner.xcodeproj
in XcodeRunner
> Build Settings > Swift Compiler - Code GenerationNo Optimization [-Onone]