I can create a dropdown for android using DropdownButton and DropdownMenuItem widgets.But for ios I couldn't see any widgets like dropdown. I have seen on Cupertino (iOS-style) widgets also, but I didn't get any idea.Is there any option to create a dropdown for ios?
In iOS, the dropdown known as Picker. You can try the Cupertino Picker Widget.
Here is the Documentation: https://api.flutter.dev/flutter/cupertino/CupertinoPicker-class.html
And Here is the repo with an example, that will show you how you can implement: https://github.com/dhuma1981/Flutter_Cupertino_Demo
Related
how to create a custom popup menu with flutter same this with Flutter Code:-
enter image description here
These packages may solve your problem:
https://pub.dev/packages/show_more_text_popup
https://pub.dev/packages/quds_popup_menu (allows for buttons within the popup)
https://pub.dev/packages/super_tooltip
I am attempting to internationalize a flutter application using the Android Studio/VS Code Flutter Intl plugin. I can get the S.of(context).value to work throughout the app in widgets I've made myself and basic Text widgets but when I use it in Flutter widgets (Text Form field, list tile, drop down menu item, dropdown button, etc) I get the "NoSuchMethodError: the getter 'value' was called on null. It seems like there might be an issue between the static pieces of the Flutter widgets and the dynamic nature of the internationalized text?
Is there a way to correct this without making all of my own widgets?
As far as I know Flutter have build in widget system that named material and cupertino. But is there any other widgets sets. I want to build site with Flutter but do not want to make it look as mobile app.
No there isn't any other widget set. Flutters material and cupertino are ment to get your app a native look. They don't have any special functionality than visual design.
If you just want to do your own styling and elements, you can build your widgets by your own. You can read more about it here:
https://www.raywenderlich.com/10126984-creating-reusable-custom-widgets-in-flutter
I have Flutter app that is using Cupertino UI components. I want to show the the Material design date_picker instead of IOS style date picker. Is there any way I can do this?
In short I want to keep the same Material style date picker for both Android and IOS app. But whenever I use the date picker under Cupertino it throws an exception "The specific widget that could not find a Material ancestor".
Thank you for your time
According to this medium post you can create an abstract class extending a StatelessWidget and using the dart.io package to determine the platform type. In your case you can test whether the underlying platform is IOS and use the material date picker using this :
if(Platform.isIOS) {
return createAndroidWidget(context);
}
you can find the full code in the aforementioned post and it'll be easy to follow it.
I know there is DropDown Button but how dropdown button work is it show content in popup style and i want to implement autocomplete textfield and want to interact with textfield while suggestion come under textfield.
There is a package available for this that you can use and it works very nicely.
You can also fetch the suggestions list from API.
Here is the link
https://github.com/jebright/flutter_typeahead_plugin