Skip to content

Fluent UI is incompatible with Flutter Material #150

Description

@BugsOverBugs

This package is great but it doesn't work in a single codebase with material.

As an example I want to build a custom class called AdaptiveCheckbox. This class decides which Checkbox should be used:

if(Platform.isWindows) return Checkbox(); //Fluent UI

if(Platform.isAndroid) return Checkbox(); //Material

Errors occurre at ThemeData, TextButton, Tab, Divider, Scrollbar, Tooltip, showDialog TextStyle or Colors.

The error message is:
The name 'ThemeData' is defined in the libraries 'package:fluent_ui/src/styles/theme.dart (via package:fluent_ui/fluent_ui.dart)' and 'package:flutter/src/material/theme_data.dart (via package:flutter/material.dart)'. (ambiguous_import at [demo] lib/src/constants/theme.dart:113)
or
'TextButton' isn't a function. (invocation_of_non_function at [demo] lib/src/widgets/buttons/blank_button.dart:136)

Solution
Could you please rename overlapping class names to something like FluentName or FlName.

That would be so helpful.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions