devolo / cockpit_open_frontend

A rewrite of the devolo Cockpit front end in Flutter
BSD 3-Clause "New" or "Revised" License
6 stars 3 forks source link

Fix compilation errors #13

Closed olof-nord closed 2 years ago

olof-nord commented 2 years ago

Fix compilation errors in the main and lib/shared/informationDialogs files.

Without these adjustments, the project does not build on my local machine.

➜  cockpit_open_frontend git:(develop) ✗ flutter run -d linux      
Launching lib/main.dart on Linux in debug mode...
ERROR: lib/main.dart:301:22: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
ERROR:  - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/opt/flutter/packages/flutter/lib/src/widgets/binding.dart').
ERROR:       WidgetsBinding.instance!.addPostFrameCallback((_) {
ERROR:                      ^
ERROR: lib/shared/informationDialogs.dart:896:23: Error: Expected ',' before this.
ERROR:                       Row(
ERROR:                       ^^^
ERROR: ../../.pub-cache/hosted/pub.dartlang.org/provider-5.0.0/lib/src/inherited_provider.dart:391:26: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
ERROR:  - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('/opt/flutter/packages/flutter/lib/src/scheduler/binding.dart').
ERROR:         SchedulerBinding.instance!.addPostFrameCallback((_) {
ERROR:                          ^
Building Linux application...                                           
Exception: Build process failed

Additionally, the automatically updated files following executing flutter pub upgrade are also added.

olof-nord commented 2 years ago

I would say @julienAhn, this is quite a risk-free change.

My flutter specifics:

➜  cockpit_open_frontend git:(fix-build-errors) flutter --version
Flutter 3.0.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision fb57da5f94 (5 weeks ago) • 2022-05-19 15:50:29 -0700
Engine • revision caaafc5604
Tools • Dart 2.17.1 • DevTools 2.12.2
julienAhn commented 2 years ago

Great! Thank you for continuing to participate in the improvement of the desktop app.