Code Monkey home page Code Monkey logo

enough_platform_widgets's People

Contributors

definitelyme avatar dungngminh avatar fotidim avatar kiruel avatar mallardduck avatar robert-virkus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

enough_platform_widgets's Issues

PlatformDropdownButton is not formatted correctly

PlatformDropdownButton is not showing the correct theme and style on iOS:

Screenshot 2023-06-08 at 9 12 48 PM

Example:
dart

                    PlatformDropdownButton<String>(
                        value: _indent,
                        onChanged: (String? newValue) {
                          if (newValue != null) {
                            setState(() {
                              _indent = newValue;
                              _formatOrFlattenJson(_codeController.text);
                            });
                          }
                        },
                        items: const <DropdownMenuItem<String>>[
                          DropdownMenuItem<String>(
                            value: '  ',
                            child: Text('2 spaces'),
                          ),
                          DropdownMenuItem<String>(
                            value: '    ',
                            child: Text('4 spaces'),
                          ),
                        ],
                      ),

flutter_platform_widgets fails to compile on Flutter 3.3.0

In flutter version 3.0.0, both FlatButton and RaisedButton were marked as deprecated and replaced with TextButton and ElevatedButton. As of flutter 3.3.0, both classes have been completely removed.
This change was also effected in flutter_platform_widgets: ^2.0.0, but trying to compile my application using the latest version of enough_platform_widgets: ^0.4.0, fails with the error below:

...

Xcode's output:

    Writing result bundle at path:
        /var/folders/7n/766r529d6_7d0ndd_x2hfyzh0000gn/T/flutter_tools.VfQgMY/flutter_ios_build_temp_dirZnGXVI/temporary_xcresult_bundle

    ../../../.pub-cache/hosted/pub.dartlang.org/flutter_platform_widgets-1.20.0/lib/src/platform_dialog_action.dart:171:14: Error: The method
    'FlatButton' isn't defined for the class 'PlatformDialogAction'.
     - 'PlatformDialogAction' is from 'package:flutter_platform_widgets/src/platform_dialog_action.dart'
     ('../../../.pub-cache/hosted/pub.dartlang.org/flutter_platform_widgets-1.20.0/lib/src/platform_dialog_action.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
          return FlatButton(
                 ^^^^^^^^^^
    ../../../.pub-cache/hosted/pub.dartlang.org/flutter_platform_widgets-1.20.0/lib/src/platform_button.dart:269:14: Error: The method
    'FlatButton' isn't defined for the class 'PlatformButton'.
     - 'PlatformButton' is from 'package:flutter_platform_widgets/src/platform_button.dart'
     ('../../../.pub-cache/hosted/pub.dartlang.org/flutter_platform_widgets-1.20.0/lib/src/platform_button.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
          return FlatButton(
                 ^^^^^^^^^^
    ../../../.pub-cache/hosted/pub.dartlang.org/flutter_platform_widgets-1.20.0/lib/src/platform_button.dart:302:12: Error: The method
    'RaisedButton' isn't defined for the class 'PlatformButton'.
     - 'PlatformButton' is from 'package:flutter_platform_widgets/src/platform_button.dart'
     ('../../../.pub-cache/hosted/pub.dartlang.org/flutter_platform_widgets-1.20.0/lib/src/platform_button.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'RaisedButton'.
        return RaisedButton(
               ^^^^^^^^^^^^
    Failed to package /Users/brendan/Mobile/FlutterProjects/tempo.
    Command PhaseScriptExecution failed with a nonzero exit code
    note: Using new build system
    note: Planning

    ...

Multiple build errors

Hello, I'm trying to use this library and I'm getting the following build errors:

  • Error: 'showPlatformDatePicker' is exported from both 'package:flutter_platform_widgets/src/platform_date_picker.dart' and 'package:enough_platform_widgets/src/platform/platform_time_picker.dart'. (../…/lib/enough_platform_widgets.dart:4)
  • Error: The argument type 'Widget Function(BuildContext, {void Function()? onStepCancel, void Function()? onStepContinue})?' can't be assigned to the parameter type 'Widget Function(BuildContext, ControlsDetails)?'. (../…/platform/platform_stepper.dart:43)
  • Error: The argument type 'Widget Function(BuildContext, {void Function()? onStepCancel, void Function()? onStepContinue})?' can't be assigned to the parameter type 'Widget Function(BuildContext, ControlsDetails)?'. (../…/platform/platform_stepper.dart:54)

Build error due to multiple import

I'm getting the following error:
Error: 'PlatformListTile' is exported from both 'package:enough_platform_widgets/src/platform/platform_list_tile.dart' and 'package:flutter_platform_widgets/src/platform_list_tile.dart'.

PlatformTabScaffold overflows PlatformNavBar in Material 3 [Android only]

The following is my HomeView:

PlatformTabScaffold(
        tabController: PlatformTabController(),
        bodyBuilder: (context, tabIndex) => AppRouter.tabs[tabIndex],
        iosContentBottomPadding: true,
        iosContentPadding: true,
        appBarBuilder: (_, __) => AdcAppBar(),
        material: (_, __) => MaterialTabScaffoldData(
          drawer: const SideMenu(),
          drawerEnableOpenDragGesture: true,
          resizeToAvoidBottomInset: true,
          primary: true,
        ),
        cupertino: (_, __) => CupertinoTabScaffoldData(
          resizeToAvoidBottomInset: true,
          resizeToAvoidBottomInsetTab: true,
        ),
        items: [
          BottomNavigationBarItem(
            icon: Icon(
              PlatformIcons(context).home,
            ),
            label: context.strings.home,
          ),
          BottomNavigationBarItem(
            icon: PlatformWidget(
              material: (_, __) => const Icon(
                Icons.history,
              ),
              cupertino: (_, __) => const Icon(
                CupertinoIcons.time_solid,
              ),
            ),
            label: context.strings.history,
          ),
        ],
      ),

This uses the default sizes for everything, yet, on Android, it overflows by 2.0 pixel at the bottom, with the following stackTrace:

======== Exception caught by rendering library =====================================================
The following assertion was thrown during layout:
A RenderFlex overflowed by 2.0 pixels on the bottom.

The relevant error-causing widget was: 
  Column Column:##################################/packages/flutter/lib/src/material/bottom_navigation_bar.dart:610:12
The overflowing RenderFlex has an orientation of Axis.vertical.
The edge of the RenderFlex that is overflowing has been marked in the rendering with a yellow and black striped pattern. This is usually caused by the contents being too big for the RenderFlex.

Consider applying a flex factor (e.g. using an Expanded widget) to force the children of the RenderFlex to fit within the available space instead of being sized to their natural size.
This is considered an error condition because it indicates that there is content that cannot be seen. If the content is legitimately bigger than the available space, consider clipping it with a ClipRect widget before putting it in the flex, or using a scrollable container rather than a Flex, like a ListView.

The specific RenderFlex in question is: RenderFlex#bb33f relayoutBoundary=up8 OVERFLOWING
...  parentData: offset=Offset(0.0, 7.0) (can use size)
...  constraints: BoxConstraints(0.0<=w<=189.7, 0.0<=h<=42.0)
...  size: Size(189.7, 42.0)
...  direction: vertical
...  mainAxisAlignment: spaceBetween
...  mainAxisSize: min
...  crossAxisAlignment: center
...  verticalDirection: down
◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤
====================================================================================================
Reloaded 1 of 1195 libraries in 558ms (compile: 21 ms, reload: 245 ms, reassemble: 190 ms).

Does not work with flutter 3.19.0

Error messasge:

../../../.pub-cache/hosted/pub.dev/enough_platform_widgets-1.0.0/lib/enough_platform_widgets.dart:7:1: Error: 'PlatformSliverAppBar' is exported from both 'package:enough_platform_widgets/src/platform/platform_sliver_appbar.dart' and 'package:flutter_platform_widgets/src/platform_sliver_app_bar.dart'.
export 'package:flutter_platform_widgets/flutter_platform_widgets.dart';
^
Target kernel_snapshot failed: Exception

Command PhaseScriptExecution failed with a nonzero exit code
** BUILD FAILED **

Won't Load: MouseCursor References

Wanted to try it out. But got about 50 errors, the first 20 were missing MouseCursor for every widget. Maybe you're trying to get compatible with web and broke apps.

Support for CupertinoFormSection

Currently CupertinoFormSection doesn't properly work with PlatformTextFormField even though it is building a CupertinoTextFormFieldRow. Would be nice if there was a widget in this package with all CupertinoFormSection features.

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.