skip to Main Content

![enter image description here

Undefined name ‘TextAlign’.
Try correcting the name to one that is defined, or defining the name.

 Text(
                'This ia a study app you can use it as you want',
                textAlign: TextAlign.center,
                style: const TextStyle(
                  fontSize: 18,
                  color: AppColors.onSurfaceTextColor,
                  fontWeight: FontWeight.bold,
                ),
              ),

Flutter doctor -v

[√] Flutter (Channel stable, 3.0.5, on Microsoft Windows [Version 10.0.22000.856], locale en-US)
    • Flutter version 3.0.5 at C:UsersusernameOneDriveDocumentsFlutterflutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f1875d570e (6 weeks ago), 2022-07-13 11:24:16 -0700
    • Engine revision e85ea0e79c
    • Dart version 2.17.6
    • DevTools version 2.12.2

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at C:UsersusernameAppDataLocalAndroidsdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: C:Program FilesAndroidAndroid Studiojrebinjava
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:Program FilesGoogleChromeApplicationchrome.exe

[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components

[√] Android Studio (version 2021.2)
    • Android Studio at C:Program FilesAndroidAndroid Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)

[√] VS Code (version 1.70.2)
    • VS Code at C:UsersusernameAppDataLocalProgramsMicrosoft VS Code
    • Flutter extension version 3.46.0

[√] Connected device (5 available)
    • ASUS Z01QD (mobile) • 127.0.0.1:5555 • android-x64    • Android 9 (API 28)
    • ASUS Z01QD (mobile) • emulator-5554  • android-x64    • Android 9 (API 28)
    • Windows (desktop)   • windows        • windows-x64    • Microsoft Windows [Version 10.0.22000.856]
    • Chrome (web)        • chrome         • web-javascript • Google Chrome 104.0.5112.102
    • Edge (web)          • edge           • web-javascript • Microsoft Edge 104.0.1293.63

[√] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

3

Answers


  1. Chosen as BEST ANSWER

    The problem was fixed with the newest version of flutter(3.3.0)


  2. Firstly flutter clean and rebuild the app.

    • If fails do flutter upgrade or flutter upgrade --force
    Login or Signup to reply.
  3. Close and Open the project if not then IDE.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search