enough-software / enough_platform_widgets Goto Github PK
View Code? Open in Web Editor NEWMore cross platform widgets for Flutter. Extends flutter_platform_widgets.
License: MIT License
More cross platform widgets for Flutter. Extends flutter_platform_widgets.
License: MIT License
PlatformDropdownButton
is not showing the correct theme and style on iOS:
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'),
),
],
),
Hey just wanted to let you know that this package does not work with Flutter 3.10.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
...
Hello, I'm trying to use this library and I'm getting the following build errors:
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'.
Have PlatformSnackApp
extend PlatformApp
to ensure the themes are inherited.
PlatformSliverAppBar is imported both from platform_sliver_appbar and enough_platform_widgets when used together. It would be better to avoid manually hiding this widget.
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).
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 **
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.
Add project to CI to make sure it builds
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.