flutter-examples icon indicating copy to clipboard operation
flutter-examples copied to clipboard

Updated main.dart file

Open deenamanick opened this issue 4 years ago • 0 comments

Performing hot restart... Syncing files to device Android SDK built for x86... lib/main.dart:25:17: Error: Field 'controller' should be initialized because its type 'TabController' doesn't allow null.

  • 'TabController' is from 'package:flutter/src/material/tab_controller.dart' ('../../snap/flutter/common/flutter/packages/flutter/lib/src/material/tab_controller.dart'). TabController controller; ^^^^^^^^^^ Restarted application in 256ms.

We are getting this error when we are running the program. This error can be fixed by introducing "late" variable in front of Tabcontroller Class.

deenamanick avatar Nov 10 '21 13:11 deenamanick