Refactor Intro Screen, Collection Pane & URL Card

This commit is contained in:
Ankit Mahato
2023-04-20 06:51:44 +05:30
parent f370e782f3
commit 67c515d44c
14 changed files with 681 additions and 453 deletions

View File

@ -0,0 +1,44 @@
import 'package:flutter/material.dart';
import 'package:apidash/consts.dart';
class URLField extends StatefulWidget {
const URLField({
super.key,
required this.activeId,
this.initialValue,
this.onChanged,
});
final String activeId;
final String? initialValue;
final void Function(String)? onChanged;
@override
State<URLField> createState() => _URLFieldState();
}
class _URLFieldState extends State<URLField> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return TextFormField(
key: Key("url-${widget.activeId}"),
initialValue: widget.initialValue,
style: kCodeStyle,
decoration: InputDecoration(
hintText: kHintTextUrlCard,
hintStyle: kCodeStyle.copyWith(
color: Theme.of(context).colorScheme.outline.withOpacity(
kHintOpacity,
),
),
border: InputBorder.none,
),
onChanged: widget.onChanged,
);
}
}