Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@ import 'package:flutter/material.dart';

class CosmosAppBar extends StatelessWidget implements PreferredSizeWidget {
final String title;
final List<Widget>? actions;

const CosmosAppBar({
Key? key,
this.title = "",
this.actions,
}) : super(key: key);

@override
Widget build(BuildContext context) {
return AppBar(
title: Text(title),
actions: actions,
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ import 'package:flutter/material.dart';

class CosmosPasswordField extends StatefulWidget {
final Function(String) onPasswordUpdated;
final String? helperText;
final String hintText;

const CosmosPasswordField({required this.onPasswordUpdated});
const CosmosPasswordField({
required this.onPasswordUpdated,
this.helperText = 'This password will be used to recover your account every time you log in to the app',
this.hintText = 'Enter password',
});

@override
_CosmosPasswordFieldState createState() => _CosmosPasswordFieldState();
Expand All @@ -22,8 +28,8 @@ class _CosmosPasswordFieldState extends State<CosmosPasswordField> {
widget.onPasswordUpdated(value);
},
decoration: InputDecoration(
hintText: 'Enter password',
helperText: 'This password will be used to recover your account every time you log in to the app',
hintText: widget.hintText,
helperText: widget.helperText,
helperMaxLines: 3,
suffixIcon: InkWell(
onTap: togglePasswordVisibility,
Expand Down
3 changes: 3 additions & 0 deletions packages/cosmos_ui_components/lib/cosmos_app_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ class CosmosAppTheme {
brightness: Brightness.light,
backgroundColor: CosmosColors.lightBg,
foregroundColor: CosmosColors.onLightText,
actionsIconTheme: IconThemeData(
color: CosmosColors.onLightText,
),
textTheme: TextTheme(
headline6: TextStyle(
fontSize: 20,
Expand Down