init
This commit is contained in:
49
lib/pages/auth/widget/auth_input.dart
Normal file
49
lib/pages/auth/widget/auth_input.dart
Normal file
@@ -0,0 +1,49 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// 输入框
|
||||
class AuthInput extends StatelessWidget {
|
||||
final String hint;
|
||||
final bool password;
|
||||
|
||||
const AuthInput({
|
||||
Key? key,
|
||||
this.hint = '',
|
||||
this.password = false,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
height: 50.0,
|
||||
alignment: Alignment.center,
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(25.0),
|
||||
child: TextField(
|
||||
obscureText: password,
|
||||
style: const TextStyle(
|
||||
fontSize: 15.0,
|
||||
color: Color(0xff000000),
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
hintText: hint,
|
||||
fillColor: Colors.white,
|
||||
filled: true,
|
||||
contentPadding: const EdgeInsets.fromLTRB(20.0, 0, 20.0, 0),
|
||||
enabledBorder: const OutlineInputBorder(
|
||||
borderSide: BorderSide.none,
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(5.0),
|
||||
),
|
||||
),
|
||||
focusedBorder: const OutlineInputBorder(
|
||||
borderSide: BorderSide.none,
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(5.0),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
18
lib/pages/auth/widget/auth_title.dart
Normal file
18
lib/pages/auth/widget/auth_title.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// 文字标题
|
||||
class AuthTitle extends StatelessWidget {
|
||||
final String title;
|
||||
const AuthTitle({Key? key, this.title = ''}) : super(key: key);
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
fontSize: 25.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xffffffff),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user