Commit 345e594d by Rizal Hermawan

feat (lls_alert): add titleStyle and subtitleStyle to LLSAlertOptions. Story #1

parent 5d73fef8
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# #
# For more info see: https://dart.dev/go/dot-packages-deprecation # For more info see: https://dart.dev/go/dot-packages-deprecation
# #
# Generated by pub on 2021-06-28 17:34:00.086929. # Generated by pub on 2021-06-30 16:41:01.704396.
async:file:///D:/flutter/2.0.4-stable/.pub-cache/hosted/pub.dartlang.org/async-2.5.0/lib/ async:file:///D:/flutter/2.0.4-stable/.pub-cache/hosted/pub.dartlang.org/async-2.5.0/lib/
boolean_selector:file:///D:/flutter/2.0.4-stable/.pub-cache/hosted/pub.dartlang.org/boolean_selector-2.1.0/lib/ boolean_selector:file:///D:/flutter/2.0.4-stable/.pub-cache/hosted/pub.dartlang.org/boolean_selector-2.1.0/lib/
characters:file:///D:/flutter/2.0.4-stable/.pub-cache/hosted/pub.dartlang.org/characters-1.1.0/lib/ characters:file:///D:/flutter/2.0.4-stable/.pub-cache/hosted/pub.dartlang.org/characters-1.1.0/lib/
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# #
# For more info see: https://dart.dev/go/dot-packages-deprecation # For more info see: https://dart.dev/go/dot-packages-deprecation
# #
# Generated by pub on 2021-06-28 19:37:02.142195. # Generated by pub on 2021-07-01 08:56:01.303781.
args:file:///D:/flutter/2.0.4-stable/.pub-cache/hosted/pub.dartlang.org/args-2.1.1/lib/ args:file:///D:/flutter/2.0.4-stable/.pub-cache/hosted/pub.dartlang.org/args-2.1.1/lib/
async:file:///D:/flutter/2.0.4-stable/.pub-cache/hosted/pub.dartlang.org/async-2.5.0/lib/ async:file:///D:/flutter/2.0.4-stable/.pub-cache/hosted/pub.dartlang.org/async-2.5.0/lib/
bloc:file:///D:/flutter/2.0.4-stable/.pub-cache/hosted/pub.dartlang.org/bloc-7.0.0/lib/ bloc:file:///D:/flutter/2.0.4-stable/.pub-cache/hosted/pub.dartlang.org/bloc-7.0.0/lib/
......
...@@ -98,15 +98,4 @@ showToastWidget( ...@@ -98,15 +98,4 @@ showToastWidget(
textColor: textColor, textColor: textColor,
fontSize: fontSize fontSize: fontSize
); );
} }
\ No newline at end of file
// Future<String> initUserAgentState() async {
// String userAgent;
// try {
// userAgent = await FlutterUserAgent.getPropertyAsync('userAgent');
// await FlutterUserAgent.init();
// } on PlatformException {
// userAgent = '<error>';
// }
// return userAgent;
// }
\ No newline at end of file
...@@ -30,6 +30,10 @@ class LLSAlertOptions { ...@@ -30,6 +30,10 @@ class LLSAlertOptions {
final LLSAlertStyle style; final LLSAlertStyle style;
final TextStyle titleStyle;
final TextStyle subtitleStyle;
LLSAlertOptions( LLSAlertOptions(
{this.showCancelButton: false, {this.showCancelButton: false,
this.title, this.title,
...@@ -39,7 +43,10 @@ class LLSAlertOptions { ...@@ -39,7 +43,10 @@ class LLSAlertOptions {
this.cancelButtonText, this.cancelButtonText,
this.confirmButtonColor, this.confirmButtonColor,
this.confirmButtonText, this.confirmButtonText,
this.style = LLSAlertStyle.success}); this.style = LLSAlertStyle.success,
this.titleStyle = const TextStyle(fontSize: 25.0, color: Color(0xff575757)),
this.subtitleStyle = const TextStyle(fontSize: 16.0, color: Color(0xff797979))
});
} }
class LLSAlertDialog extends StatefulWidget { class LLSAlertDialog extends StatefulWidget {
...@@ -145,7 +152,7 @@ class _LLSAlertDialogState extends State<LLSAlertDialog> with SingleTickerProvid ...@@ -145,7 +152,7 @@ class _LLSAlertDialogState extends State<LLSAlertDialog> with SingleTickerProvid
padding: EdgeInsets.only(top: 24.0), padding: EdgeInsets.only(top: 24.0),
child: Text( child: Text(
_options!.title!, _options!.title!,
style: TextStyle(fontSize: 25.0, color: Color(0xff575757)), style: _options!.titleStyle,
), ),
)); ));
} }
...@@ -159,7 +166,7 @@ class _LLSAlertDialogState extends State<LLSAlertDialog> with SingleTickerProvid ...@@ -159,7 +166,7 @@ class _LLSAlertDialogState extends State<LLSAlertDialog> with SingleTickerProvid
padding: EdgeInsets.only(top: paddingTop), padding: EdgeInsets.only(top: paddingTop),
child: Text( child: Text(
_options!.subtitle!, _options!.subtitle!,
style: TextStyle(fontSize: 16.0, color: Color(0xff797979)), style: _options!.subtitleStyle,
), ),
)); ));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment