Skip to content

Commit 07650a1

Browse files
Updated Changelog.md
1 parent 0b9b625 commit 07650a1

3 files changed

Lines changed: 186 additions & 72 deletions

File tree

CHANGELOG.md

Lines changed: 135 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,138 @@
1-
## 1.2.0
1+
## 2.0.0
22

3-
Major feature upgrade release
3+
Major feature upgrade release.
44

5-
New features:
5+
This release brings KAlertFlutter much closer to the native Android Java KAlertDialog library with a modern dialog API, professional UI styling, advanced customization, input validation, image dialogs, progress dialogs, and backward compatibility with the old API.
66

7-
- success dialog type
8-
- error dialog type
9-
- warning dialog type
10-
- info dialog type
11-
- confirm dialog support
12-
- prompt dialog support
13-
- icon support
14-
- modern rounded UI dialog design
15-
- improved API structure
7+
### New features
8+
9+
- Added new `KAlertDialog` API.
10+
- Added `KAlertDialog.show()`.
11+
- Added `KAlertDialog.success()`.
12+
- Added `KAlertDialog.error()`.
13+
- Added `KAlertDialog.warning()`.
14+
- Added `KAlertDialog.info()`.
15+
- Added `KAlertDialog.question()`.
16+
- Added `KAlertDialog.progress()`.
17+
- Added `KAlertDialog.input()`.
18+
- Added `KAlertDialog.customView()`.
19+
- Added `KAlertDialog.customImage()`.
20+
- Added `KAlertDialog.urlImage()`.
21+
22+
### New dialog types
23+
24+
- Added `KAlertType.normal`.
25+
- Added `KAlertType.success`.
26+
- Added `KAlertType.error`.
27+
- Added `KAlertType.warning`.
28+
- Added `KAlertType.info`.
29+
- Added `KAlertType.question`.
30+
- Added `KAlertType.progress`.
31+
- Added `KAlertType.input`.
32+
- Added `KAlertType.customImage`.
33+
- Added `KAlertType.urlImage`.
34+
- Added `KAlertType.customView`.
35+
36+
### New style presets
37+
38+
- Added `KAlertStyle.classic`.
39+
- Added `KAlertStyle.modern`.
40+
- Added `KAlertStyle.minimal`.
41+
- Added `KAlertStyle.rounded`.
42+
43+
### Image dialog support
44+
45+
- Added custom image dialog support.
46+
- Added URL image dialog support.
47+
- Added big URL image mode.
48+
- Added circle URL image mode.
49+
- Added `KAlertImageType.big`.
50+
- Added `KAlertImageType.circle`.
51+
- Added URL image placeholder support.
52+
- Added URL image error widget support.
53+
54+
### Input dialog improvements
55+
56+
- Added input validation support.
57+
- Added input max length support.
58+
- Added keyboard type support.
59+
- Added initial input value support.
60+
- Added input confirm callback.
61+
- Fixed input dialog controller lifecycle handling.
62+
- Fixed TextEditingController disposed error.
63+
64+
### Custom view support
65+
66+
- Added support for placing any custom Flutter widget inside the dialog.
67+
- Added custom view dialog API using `KAlertDialog.customView()`.
68+
69+
### Progress dialog support
70+
71+
- Added progress/loading dialog.
72+
- Added non-dismissible progress dialog support.
73+
- Added custom progress color support.
74+
75+
### Dialog customization
76+
77+
- Added custom dialog corner radius.
78+
- Added custom dialog elevation.
79+
- Added custom dim amount.
80+
- Added custom max width.
81+
- Added custom background color.
82+
- Added custom title color.
83+
- Added custom content color.
84+
- Added custom icon color.
85+
- Added custom title text style.
86+
- Added custom content text style.
87+
- Added title font weight support.
88+
- Added content font weight support.
89+
- Added title text size support.
90+
- Added content text size support.
91+
92+
### Button customization
93+
94+
- Added confirm button text customization.
95+
- Added cancel button text customization.
96+
- Added confirm button color customization.
97+
- Added cancel button color customization.
98+
- Added confirm button text color customization.
99+
- Added cancel button text color customization.
100+
- Added button text size customization.
101+
- Added confirm button font weight support.
102+
- Added cancel button font weight support.
103+
- Added button all-caps control.
104+
- Added show/hide confirm button support.
105+
- Added show/hide cancel button support.
106+
107+
### Callback APIs
108+
109+
- Added `onShow` callback.
110+
- Added `onDismiss` callback.
111+
- Added `onConfirm` callback.
112+
- Added `onCancel` callback.
113+
- Added input confirm callback.
114+
115+
### UI improvements
116+
117+
- Added modern Material-style dialog design.
118+
- Added smooth fade and scale transition animation.
119+
- Added animated dialog icons.
120+
- Added dark mode friendly styling.
121+
- Added responsive dialog max height handling.
122+
- Added scroll handling to prevent keyboard overflow.
123+
- Improved dialog spacing, radius, colors, and button layout.
124+
125+
### Backward compatibility
126+
127+
- Kept old `KAlert.show()` API.
128+
- Kept old `KAlert.confirm()` API.
129+
- Kept old `KAlert.prompt()` API.
130+
- Old API now uses the new modern dialog UI internally.
131+
132+
### Fixes
133+
134+
- Fixed generic result type issue with `KAlertResult<String>`.
135+
- Fixed `KAlertResult<dynamic>` type error on confirm button click.
136+
- Fixed `TextEditingController was used after being disposed` issue in input dialogs.
137+
- Fixed keyboard overflow issue in input dialogs.
138+
- Improved dialog closing behavior for input and custom callback flows.

example/lib/main.dart

Lines changed: 26 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ class HomePage extends StatelessWidget {
5252
@override
5353
Widget build(BuildContext context) {
5454
return Scaffold(
55-
appBar: AppBar(
56-
title: const Text('KAlert Flutter Demo'),
57-
),
55+
appBar: AppBar(title: const Text('KAlert Flutter Demo')),
5856
body: SafeArea(
5957
child: ListView(
6058
padding: const EdgeInsets.all(18),
@@ -66,7 +64,7 @@ class HomePage extends StatelessWidget {
6664
_SectionTitle(
6765
title: 'Modern Styling',
6866
subtitle:
69-
'Modern preset, custom appearance, font weight and professional dialog styling.',
67+
'Modern preset, custom appearance, font weight and professional dialog styling.',
7068
),
7169

7270
_DemoButton(
@@ -78,7 +76,7 @@ class HomePage extends StatelessWidget {
7876
context: context,
7977
title: 'Success',
8078
content:
81-
'Your changes were saved successfully. This dialog uses the modern style preset.',
79+
'Your changes were saved successfully. This dialog uses the modern style preset.',
8280
confirmText: 'Done',
8381
);
8482
},
@@ -93,7 +91,7 @@ class HomePage extends StatelessWidget {
9391
context: context,
9492
title: 'Custom Appearance',
9593
content:
96-
'This dialog has custom corner radius, elevation and dim amount for a premium feel.',
94+
'This dialog has custom corner radius, elevation and dim amount for a premium feel.',
9795
type: KAlertType.normal,
9896
style: KAlertStyle.modern,
9997
cornerRadius: 30,
@@ -113,7 +111,7 @@ class HomePage extends StatelessWidget {
113111
context: context,
114112
title: 'Font Weight Support',
115113
content:
116-
'You can control title, content and button font weights directly from the dialog API.',
114+
'You can control title, content and button font weights directly from the dialog API.',
117115
type: KAlertType.normal,
118116
style: KAlertStyle.modern,
119117
titleFontWeight: FontWeight.w900,
@@ -129,7 +127,7 @@ class HomePage extends StatelessWidget {
129127
_SectionTitle(
130128
title: 'Dialog Types',
131129
subtitle:
132-
'Basic, success, error, warning, info and question dialogs.',
130+
'Basic, success, error, warning, info and question dialogs.',
133131
),
134132

135133
_DemoButton(
@@ -141,7 +139,7 @@ class HomePage extends StatelessWidget {
141139
context: context,
142140
title: 'Basic Message',
143141
content:
144-
'This is a clean basic message dialog. Existing simple APIs still work perfectly.',
142+
'This is a clean basic message dialog. Existing simple APIs still work perfectly.',
145143
type: KAlertType.normal,
146144
style: KAlertStyle.classic,
147145
confirmText: 'OK',
@@ -158,7 +156,7 @@ class HomePage extends StatelessWidget {
158156
context: context,
159157
title: 'Something went wrong',
160158
content:
161-
'We could not complete this action. Please check your connection and try again.',
159+
'We could not complete this action. Please check your connection and try again.',
162160
confirmText: 'Try Again',
163161
);
164162
},
@@ -173,7 +171,7 @@ class HomePage extends StatelessWidget {
173171
context: context,
174172
title: 'Delete this file?',
175173
content:
176-
'This action cannot be undone. You can confirm or cancel this action.',
174+
'This action cannot be undone. You can confirm or cancel this action.',
177175
confirmText: 'Delete',
178176
cancelText: 'Cancel',
179177
);
@@ -207,7 +205,7 @@ class HomePage extends StatelessWidget {
207205
context: context,
208206
title: 'Information',
209207
content:
210-
'This is an informational dialog for helpful updates or notices.',
208+
'This is an informational dialog for helpful updates or notices.',
211209
confirmText: 'Got it',
212210
);
213211
},
@@ -246,7 +244,7 @@ class HomePage extends StatelessWidget {
246244
_SectionTitle(
247245
title: 'Input and Custom View',
248246
subtitle:
249-
'Input validation, max length, keyboard type and custom Flutter widget support.',
247+
'Input validation, max length, keyboard type and custom Flutter widget support.',
250248
),
251249

252250
_DemoButton(
@@ -329,7 +327,7 @@ class HomePage extends StatelessWidget {
329327
_SectionTitle(
330328
title: 'Images',
331329
subtitle:
332-
'Custom image, URL circle image and big URL image examples.',
330+
'Custom image, URL circle image and big URL image examples.',
333331
),
334332

335333
_DemoButton(
@@ -341,7 +339,7 @@ class HomePage extends StatelessWidget {
341339
context: context,
342340
title: 'Custom Image',
343341
content:
344-
'You can show an asset image, memory image or network image provider.',
342+
'You can show an asset image, memory image or network image provider.',
345343
image: const NetworkImage(sampleImageUrl),
346344
confirmText: 'OK',
347345
);
@@ -373,7 +371,7 @@ class HomePage extends StatelessWidget {
373371
context: context,
374372
title: 'Big URL Image',
375373
content:
376-
'This example loads a large image inside the dialog with fallback support.',
374+
'This example loads a large image inside the dialog with fallback support.',
377375
imageUrl: sampleImageUrl,
378376
imageType: KAlertImageType.big,
379377
confirmText: 'Close',
@@ -386,7 +384,7 @@ class HomePage extends StatelessWidget {
386384
_SectionTitle(
387385
title: 'Advanced Controls',
388386
subtitle:
389-
'Buttons, callbacks, progress and backward compatible APIs.',
387+
'Buttons, callbacks, progress and backward compatible APIs.',
390388
),
391389

392390
_DemoButton(
@@ -398,7 +396,7 @@ class HomePage extends StatelessWidget {
398396
context: context,
399397
title: 'Button Styling',
400398
content:
401-
'This example shows button text size, font weight, all caps control and custom colors.',
399+
'This example shows button text size, font weight, all caps control and custom colors.',
402400
type: KAlertType.normal,
403401
style: KAlertStyle.minimal,
404402
showCancelButton: true,
@@ -452,7 +450,7 @@ class HomePage extends StatelessWidget {
452450
context: context,
453451
title: 'Callbacks',
454452
content:
455-
'This dialog shows onShow, onDismiss, onConfirm and onCancel examples.',
453+
'This dialog shows onShow, onDismiss, onConfirm and onCancel examples.',
456454
type: KAlertType.normal,
457455
style: KAlertStyle.modern,
458456
showCancelButton: true,
@@ -483,7 +481,7 @@ class HomePage extends StatelessWidget {
483481
context,
484482
title: 'Backward Compatible',
485483
message:
486-
'Your old KAlert.show() API still works with the new dialog UI.',
484+
'Your old KAlert.show() API still works with the new dialog UI.',
487485
type: KAlertType.success,
488486
);
489487
},
@@ -498,7 +496,7 @@ class HomePage extends StatelessWidget {
498496
context,
499497
title: 'Old Confirm API',
500498
message:
501-
'This uses the old KAlert.confirm() method but shows the new UI.',
499+
'This uses the old KAlert.confirm() method but shows the new UI.',
502500
);
503501

504502
if (!context.mounted) return;
@@ -509,7 +507,9 @@ class HomePage extends StatelessWidget {
509507
message: result == true
510508
? 'You confirmed the action.'
511509
: 'You cancelled the action.',
512-
type: result == true ? KAlertType.success : KAlertType.warning,
510+
type: result == true
511+
? KAlertType.success
512+
: KAlertType.warning,
513513
);
514514
},
515515
),
@@ -551,10 +551,7 @@ class HomePage extends StatelessWidget {
551551
decoration: BoxDecoration(
552552
borderRadius: BorderRadius.circular(26),
553553
gradient: const LinearGradient(
554-
colors: [
555-
Color(0xFF0F172A),
556-
Color(0xFF111827),
557-
],
554+
colors: [Color(0xFF0F172A), Color(0xFF111827)],
558555
begin: Alignment.topLeft,
559556
end: Alignment.bottomRight,
560557
),
@@ -624,10 +621,7 @@ class _SectionTitle extends StatelessWidget {
624621
final String title;
625622
final String subtitle;
626623

627-
const _SectionTitle({
628-
required this.title,
629-
required this.subtitle,
630-
});
624+
const _SectionTitle({required this.title, required this.subtitle});
631625

632626
@override
633627
Widget build(BuildContext context) {
@@ -705,14 +699,11 @@ class _DemoButton extends StatelessWidget {
705699
),
706700
),
707701
),
708-
const Icon(
709-
Icons.arrow_forward_ios_rounded,
710-
size: 16,
711-
),
702+
const Icon(Icons.arrow_forward_ios_rounded, size: 16),
712703
],
713704
),
714705
),
715706
),
716707
);
717708
}
718-
}
709+
}

0 commit comments

Comments
 (0)