Giter Club home page Giter Club logo

πŸ› The name 'Colors' is defined in the libraries 'package:fluent_ui/src/styles/color.dart (via package:fluent_ui/fluent_ui.dart)' and 'package:flutter/src/material/colors.dart (via package:flutter/material.dart)'. about fluent_ui HOT 7 CLOSED

bdlukaa avatar bdlukaa commented on July 20, 2024
πŸ› The name 'Colors' is defined in the libraries 'package:fluent_ui/src/styles/color.dart (via package:fluent_ui/fluent_ui.dart)' and 'package:flutter/src/material/colors.dart (via package:flutter/material.dart)'.

from fluent_ui.

Comments (7)

JohnOyekanmi avatar JohnOyekanmi commented on July 20, 2024 2

Unfortunately, that doesn't solve the problem.

2021-07-02_135741

2021-07-02_135805

2021-07-02_135818

To use scaffold you'll have to do: material.Scaffold(...)

To use any api, widget or Classes defined in the material Libraries you'll have to add a material. (or the name used in importing the material Library) prefix before the concerned item.

You can try hiding the Colors class api from being exposed by importing the material library this way:

import 'package:flutter/material.dart' hide Colors; import 'package: fluent_ui/fluent_ui.dart';

This will hide the Colors api from being exposed in the import. You can also use this same method to hide it from the fluent_ui package as well.

from fluent_ui.

bdlukaa avatar bdlukaa commented on July 20, 2024 1

Yes! I don't see why to use both libraries together, anyways.

Can this issue be closed?

from fluent_ui.

bdlukaa avatar bdlukaa commented on July 20, 2024

you're trying to import both fluent and material libraries. Please import only one.

If you need to import both, use:

import 'package:flutter/material.dart' as material;
import 'package: fluent_ui/fluent_ui.dart';

from fluent_ui.

bdlukaa avatar bdlukaa commented on July 20, 2024

Do you still see this issue?

from fluent_ui.

Patrick386 avatar Patrick386 commented on July 20, 2024

Unfortunately, that doesn't solve the problem.

2021-07-02_135741

2021-07-02_135805

2021-07-02_135818

from fluent_ui.

Patrick386 avatar Patrick386 commented on July 20, 2024

Yes, you can close it.
It's a great package. Thank you.

from fluent_ui.

bdlukaa avatar bdlukaa commented on July 20, 2024

thanks :)

from fluent_ui.

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.