lohanidamodar/flutter_ui_challenges

Error during compilation

melying opened this issue · 5 comments

Hi,

after I have fetched the dependencies and tried to run the app in the simulator, I get the following error message:

`Compiler message:
lib/src/pages/profile/profile9.dart:59:22: Error: The getter 'headline6' isn't defined for the class 'TextTheme'.

  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../Desktop/flutter/packages/flutter/lib/src/material/text_theme.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'headline6'.
    .headline6
    ^^^^^^^^^
    lib/src/pages/profile/profile9.dart:91:66: Error: The getter 'headline4' isn't defined for the class 'TextTheme'.
  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../Desktop/flutter/packages/flutter/lib/src/material/text_theme.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'headline4'.
    style: Theme.of(context).textTheme.headline4,
    ^^^^^^^^^
    lib/src/pages/profile/profile9.dart:96:66: Error: The getter 'subtitle1' isn't defined for the class 'TextTheme'.
  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../Desktop/flutter/packages/flutter/lib/src/material/text_theme.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'subtitle1'.
    style: Theme.of(context).textTheme.subtitle1,
    ^^^^^^^^^
    lib/src/pages/profile/profile9.dart:106:66: Error: The getter 'headline4' isn't defined for the class 'TextTheme'.
  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../Desktop/flutter/packages/flutter/lib/src/material/text_theme.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'headline4'.
    style: Theme.of(context).textTheme.headline4,
    ^^^^^^^^^
    lib/src/pages/profile/profile9.dart:111:66: Error: The getter 'subtitle1' isn't defined for the class 'TextTheme'.
  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../Desktop/flutter/packages/flutter/lib/src/material/text_theme.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'subtitle1'.
    style: Theme.of(context).textTheme.subtitle1,
    ^^^^^^^^^
    lib/src/pages/profile/profile9.dart:123:52: Error: The getter 'headline5' isn't defined for the class 'TextTheme'.
  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../Desktop/flutter/packages/flutter/lib/src/material/text_theme.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'headline5'.
    style: Theme.of(context).textTheme.headline5,
    ^^^^^^^^^
    lib/src/pages/profile/profile9.dart:143:52: Error: The getter 'headline5' isn't defined for the class 'TextTheme'.
  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../Desktop/flutter/packages/flutter/lib/src/material/text_theme.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'headline5'.
    style: Theme.of(context).textTheme.headline5,
    ^^^^^^^^^
    lib/src/pages/profile/profile9.dart:219:13: Error: No named parameter with the name 'clipBehavior'.
    clipBehavior: Clip.antiAlias,
    ^^^^^^^^^^^^
    ../../Desktop/flutter/packages/flutter/lib/src/widgets/container.dart:302:3: Context: Found this candidate, but the arguments don't match.
    Container({
    ^^^^^^^^^
    lib/src/pages/profile/profile9.dart:242:20: Error: The getter 'headline6' isn't defined for the class 'TextTheme'.
  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../Desktop/flutter/packages/flutter/lib/src/material/text_theme.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'headline6'.
    .headline6
    ^^^^^^^^^
    Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
    Failed to build bundle.
    Error launching application on iPhone 11.`

Please help with this, thanks!

You must use the latest version of Flutter (post output of your flutter doctor -v)

This was the output from flutter doctor:

[✓] Flutter (Channel stable, v1.12.13+hotfix.9, on Mac OS X 10.15.4 19E287,
locale en-SG)
• Flutter version 1.12.13+hotfix.9 at /Users/melying/Desktop/flutter
• Framework revision f139b11009 (3 months ago), 2020-03-30 13:57:30 -0700
• Engine revision af51afceb8
• Dart version 2.7.2

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/melying/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling
support)
• Platform android-29, build-tools 29.0.3
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_212-release-1586-b4-5784211)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.4.1, Build version 11E503a
• CocoaPods version 1.9.1

[✓] Android Studio (version 3.6)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 45.1.1
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build
1.8.0_212-release-1586-b4-5784211)

[✓] Connected device (1 available)
• iPhone 11 • AE34444E-0073-4204-927C-E31BBC3904E3 • ios •
com.apple.CoreSimulator.SimRuntime.iOS-13-4 (simulator)

Upgrade your flutter (1.17)

Ok thanks, appreciate your replies!!

No problem. do reopen the issue if you still have problem after upgrades.