Coder Social home page Coder Social logo

Comments (5)

JackJonson avatar JackJonson commented on May 27, 2024

@saravananmnm Can you provide flutter doctor -v and elaborate on what exactly are you trying to achieve along with expected vs actual behavior ?
Thanks.

from flutter_styled_toast.

saravananmnm avatar saravananmnm commented on May 27, 2024

C:\Saravanan\Flutter_sdk\flutter\bin\flutter.bat doctor --verbose
[√] Flutter (Channel stable, 1.22.5, on Microsoft Windows [Version 10.0.19042.1165], locale en-US)
• Flutter version 1.22.5 at C:\Saravanan\Flutter_sdk\flutter
• Framework revision 7891006299 (9 months ago), 2020-12-10 11:54:40 -0800
• Engine revision ae90085a84
• Dart version 2.10.4

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at C:\Users\WDSI\AppData\Local\Android\sdk
• Platform android-30, build-tools 30.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.

[!] Android Studio (version 4.1.0)
• Android Studio at C:\Program Files\Android\Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] Connected device (1 available)
• Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)

! Doctor found issues in 1 category.

from flutter_styled_toast.

saravananmnm avatar saravananmnm commented on May 27, 2024

@JackJonson Yes. I expect without context is getting errors. But in default constructor doesn't have the required field of context.

from flutter_styled_toast.

JackJonson avatar JackJonson commented on May 27, 2024

@saravananmnm Hi, There is a solution:
If you want to show toast without giving context, must wrap your app with StyledToast.

Simple global configuration, wrap you app with StyledToast.

StyledToast(
  locale: const Locale('en', 'US'),
  child: MaterialApp(
            title: appTitle,
            showPerformanceOverlay: showPerformance,
            home: LayoutBuilder(
              builder: (BuildContext context, BoxConstraints constraints) {
                return MyHomePage(
                  title: appTitle,
                  onSetting: onSettingCallback,
                );
              },
            ),
          ),
)

from flutter_styled_toast.

saravananmnm avatar saravananmnm commented on May 27, 2024

@JackJonson Thanks for the simple solution.

from flutter_styled_toast.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.