File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed
packages/cosmos_ui_components/lib Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -2,16 +2,19 @@ import 'package:flutter/material.dart';
22
33class CosmosAppBar extends StatelessWidget implements PreferredSizeWidget {
44 final String title;
5+ final List <Widget >? actions;
56
67 const CosmosAppBar ({
78 Key ? key,
89 this .title = "" ,
10+ this .actions,
911 }) : super (key: key);
1012
1113 @override
1214 Widget build (BuildContext context) {
1315 return AppBar (
1416 title: Text (title),
17+ actions: actions,
1518 );
1619 }
1720
Original file line number Diff line number Diff line change @@ -2,8 +2,14 @@ import 'package:flutter/material.dart';
22
33class CosmosPasswordField extends StatefulWidget {
44 final Function (String ) onPasswordUpdated;
5+ final String ? helperText;
6+ final String hintText;
57
6- const CosmosPasswordField ({required this .onPasswordUpdated});
8+ const CosmosPasswordField ({
9+ required this .onPasswordUpdated,
10+ this .helperText = 'This password will be used to recover your account every time you log in to the app' ,
11+ this .hintText = 'Enter password' ,
12+ });
713
814 @override
915 _CosmosPasswordFieldState createState () => _CosmosPasswordFieldState ();
@@ -22,8 +28,8 @@ class _CosmosPasswordFieldState extends State<CosmosPasswordField> {
2228 widget.onPasswordUpdated (value);
2329 },
2430 decoration: InputDecoration (
25- hintText: 'Enter password' ,
26- helperText: 'This password will be used to recover your account every time you log in to the app' ,
31+ hintText: widget.hintText ,
32+ helperText: widget.helperText ,
2733 helperMaxLines: 3 ,
2834 suffixIcon: InkWell (
2935 onTap: togglePasswordVisibility,
Original file line number Diff line number Diff line change @@ -31,6 +31,9 @@ class CosmosAppTheme {
3131 brightness: Brightness .light,
3232 backgroundColor: CosmosColors .lightBg,
3333 foregroundColor: CosmosColors .onLightText,
34+ actionsIconTheme: IconThemeData (
35+ color: CosmosColors .onLightText,
36+ ),
3437 textTheme: TextTheme (
3538 headline6: TextStyle (
3639 fontSize: 20 ,
You can’t perform that action at this time.
0 commit comments