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
Recommended libraries for Dart & Flutter:
https://lazebny.io/recommended-libraries-for-dart-flutter
#article
https://lazebny.io/recommended-libraries-for-dart-flutter
#article
Michael Lazebny
Recommended Libraries for Dart & Flutter
Recommended libraries for Dart & Flutter: built-in, utilities, network, storage, streams, animations, performance, testing, media and more.
21๐10๐ฅ4โค3
Let's talk about dependency injection (DI) in the next article?
๐ / ๐
๐ / ๐
๐91โค3๐ฅ3๐ฏ1
Just a very funny package to use when your client did not pay you ๐
https://pub.dev/packages/flutter_not_paid
https://pub.dev/packages/flutter_not_paid
Dart packages
flutter_not_paid | Flutter package
Client did not pay? Add this widget into your app and the app will fade away completely on reaching deadline.
๐22๐2๐ฅ1
Forwarded from Oh, my Flutter [ENG] (Theodor)
A very cool presentation by Vyacheslav Egorov about the inner workings of Dart.
Using the example of two for-loops, he explains and demonstrates how to determine when the compiler generates suboptimal code and how to deal with it.
Additionally, the speaker showcases how to achieve Hot Reload by integrating Dart with SwiftUI and Jetpack Compose through FFI.
Highly recommended for viewing.
๐ Presentation
#video
#ohmyteam
#ohmyfedukenukem
Using the example of two for-loops, he explains and demonstrates how to determine when the compiler generates suboptimal code and how to deal with it.
Additionally, the speaker showcases how to achieve Hot Reload by integrating Dart with SwiftUI and Jetpack Compose through FFI.
Highly recommended for viewing.
๐ Presentation
#video
#ohmyteam
#ohmyfedukenukem
โค5
This media is not supported in your browser
VIEW IN TELEGRAM
๐ค We've recently developed a simple plugin for Flutter that allows you to create custom wraps for the widgets you want!
Grab it here
Grab it here
1๐ฅ13๐5โค3
If you need to create instances of your objects, use Factory Pattern.
Extremely clean and scalable solution.
#tip
Extremely clean and scalable solution.
#tip
๐10๐ฅด7โค3๐1
Article about dependency injection comes tomorrow! ๐ช
Please open Telegram to view this post
VIEW IN TELEGRAM
1๐13๐ฅ13โค3
Please open Telegram to view this post
VIEW IN TELEGRAM
Michael Lazebny
Dependency Injection in Flutter
This article talks about dependency injection - how, where, and why to initialize dependencies. As a bonus, a comparison to get_it and riverpod.
22โค8๐ฅ5๐2
1๐ฅ6โค1