Master popups in Flutter: dropdowns, overlays, menus, and more.
https://lazebny.io/popups-in-flutter/
https://lazebny.io/popups-in-flutter/
Michael Lazebny
Popups in Flutter
Master popups in Flutter: dropdowns, overlays, menus, and more. Learn how to position popups correctly and manage overflow.
🔥11❤5👍5
Some of my plans for June:
- land a few updates to Sizzle starter (improved http client, tests, structure and docs)
- write RTE (rich text editor) specification (I’m planning to build editor some time I have clear understanding of all the details)
- article about Focus in flutter (tab traversal, shortcuts, screen reader, how does it work under the hood)
- land a few updates to Sizzle starter (improved http client, tests, structure and docs)
- write RTE (rich text editor) specification (I’m planning to build editor some time I have clear understanding of all the details)
- article about Focus in flutter (tab traversal, shortcuts, screen reader, how does it work under the hood)
🔥12
Avoid these dart libraries. Briefly about their drawbacks and better alternatives.
https://lazebny.io/avoid-these-dart-libraries/
#flutter #flutterdev #dart
https://lazebny.io/avoid-these-dart-libraries/
#flutter #flutterdev #dart
Michael Lazebny
Avoid These Dart Libraries
This article lists popular Dart and Flutter libraries that are not recommended, including Riverpod, Get, Get_it, Hive, and Stacked.
👍15🔥6🤔4👏2👌1💯1
Implemented this chart using CustomPainter in Flutter.
25👍 and I will publish the source code :)
25👍 and I will publish the source code :)
👍55🤡3🔥1
I’m researching the internals of EditableText (widget that is used by TextField)
Planning to write an article about how it renders text, manages selection and communicates with platform
Sounds interesting? Press👍
Planning to write an article about how it renders text, manages selection and communicates with platform
Sounds interesting? Press
Please open Telegram to view this post
VIEW IN TELEGRAM
👍57
New article is coming on Monday. It is about Focus System - Focus Tree, Traversal and Key Events!
🔥9👍3❤2
Mobile Tech
Next article topic
Next article is going to be about implementing UI Kit!
Things to be covered:
- Theme, fonts
- Creating components (buttons, text, dialogs, sheets)
- Dedicated package for ui kit
- Optionally creating preview for UI elements and theme
Press👍 if you're waiting for it.
Things to be covered:
- Theme, fonts
- Creating components (buttons, text, dialogs, sheets)
- Dedicated package for ui kit
- Optionally creating preview for UI elements and theme
Press
Please open Telegram to view this post
VIEW IN TELEGRAM
👍37❤3🔥2
This media is not supported in your browser
VIEW IN TELEGRAM
Will be incredibly useful article.
Please open Telegram to view this post
VIEW IN TELEGRAM
1🔥22🥰2
Tomorrow, I'm launching a new article series on creating UI Kits.
I’ll guide you through developing various components like buttons, text fields, and more.
You’ll also learn about animations, transitions, iconography, responsive design tools, and best practices for layouts and custom components.
#article #uikit #flutter
I’ll guide you through developing various components like buttons, text fields, and more.
You’ll also learn about animations, transitions, iconography, responsive design tools, and best practices for layouts and custom components.
#article #uikit #flutter
7❤22👍7🔥7
Creating the Perfect UI Kit in Flutter, Part One! Theme, typography, buttons, text fields and more in this comprehensive article:
https://lazebny.io/creating-ui-kit-in-flutter-1
https://lazebny.io/creating-ui-kit-in-flutter-1
Michael Lazebny
Crafting Perfect UI Kit in Flutter
Creating a UI kit or widget library in Flutter the right way. This article tells about creating themes, custom buttons and textfields the right way.
51❤9🔥3👍2
#tip
If you're using SharedPreferences (or any other key-value storage) consider creating a separate class that manages the entry.
This way, you ensure that the key is the same during setting and reading as well as simply convenient and powerful as you may create custom codecs and support complex types.
See source code here
If you're using SharedPreferences (or any other key-value storage) consider creating a separate class that manages the entry.
This way, you ensure that the key is the same during setting and reading as well as simply convenient and powerful as you may create custom codecs and support complex types.
See source code here
❤19🔥7💯4
How to implement design breakpoints correctly:
Define a class that contains breakpoints for your app, usually it contains 2-3 values:
Define a scope that provides this
Then get this value from the BuildContext and do whatever you want:
Here are the sources
Define a class that contains breakpoints for your app, usually it contains 2-3 values:
enum WindowSize {
compact._(0, 600),
medium._(600, 839),
expanded._(840, 1199),
large._(1200, 1599),
extraLarge._(1600, double.infinity);
/// The minimum width of the breakpoint.
final double min;
/// The maximum width of the breakpoint.
final double max;
const WindowSize._(this.min, this.max);
}
Define a scope that provides this
WindowSize
down the context:
/// Scope that provides [WindowSize] to its descendants.
class WindowSizeScope extends StatefulWidget {
/// Creates a [WindowSizeScope] that provides [WindowSize] to its descendants.
const WindowSizeScope({
required this.child,
super.key,
});
/// The widget below this widget in the tree.
final Widget child;
/// Returns the [WindowSize] of the nearest [WindowSizeScope] ancestor.
static WindowSize of(BuildContext context, {bool listen = true}) {
final inherited = listen
? context.dependOnInheritedWidgetOfExactType<_InheritedWindowSize>()
: context.findAncestorWidgetOfExactType<_InheritedWindowSize>();
return inherited?.windowSize ??
(throw FlutterError('WindowSizeScope was not found in the widget tree'));
}
@override
State<WindowSizeScope> createState() => _WindowSizeScopeState();
}
class _WindowSizeScopeState extends State<WindowSizeScope> with WidgetsBindingObserver {
late WindowSize _windowSize;
Size _getScreenSize() {
final view = PlatformDispatcher.instance.views.first;
return view.physicalSize / view.devicePixelRatio;
}
@override
void initState() {
_windowSize = WindowSize.fromWidth(_getScreenSize().width);
WidgetsBinding.instance.addObserver(this);
super.initState();
}
@override
void didChangeMetrics() {
final windowSize = WindowSize.fromWidth(_getScreenSize().width);
if (_windowSize != windowSize) {
setState(() => _windowSize = windowSize);
}
super.didChangeMetrics();
}
@override
void dispose() {
WidgetsBinding.instance.removeObserver(this);
super.dispose();
}
@override
Widget build(BuildContext context) => _InheritedWindowSize(
windowSize: _windowSize,
child: widget.child,
);
}
Then get this value from the BuildContext and do whatever you want:
final windowSize = WindowSize.of(context);
if (windowSize.isExpanded) return ExpandedWidget();
if (windowSize.isMedium) return MediumWidget();
Here are the sources
7🔥13❤🔥5👍4👏1