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
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