mirror of
https://github.com/foss42/apidash.git
synced 2025-06-18 21:04:37 +08:00
fix: review changes
This commit is contained in:
38
lib/screens/common_widgets/envfield_url.dart
Normal file
38
lib/screens/common_widgets/envfield_url.dart
Normal file
@ -0,0 +1,38 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:apidash/consts.dart';
|
||||
import 'environment_field.dart';
|
||||
|
||||
class EnvURLField extends StatelessWidget {
|
||||
const EnvURLField({
|
||||
super.key,
|
||||
required this.selectedId,
|
||||
this.initialValue,
|
||||
this.onChanged,
|
||||
this.onFieldSubmitted,
|
||||
});
|
||||
|
||||
final String selectedId;
|
||||
final String? initialValue;
|
||||
final void Function(String)? onChanged;
|
||||
final void Function(String)? onFieldSubmitted;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return EnvironmentField(
|
||||
keyId: "url-$selectedId",
|
||||
initialValue: initialValue,
|
||||
style: kCodeStyle,
|
||||
decoration: InputDecoration(
|
||||
hintText: kHintTextUrlCard,
|
||||
hintStyle: kCodeStyle.copyWith(
|
||||
color: Theme.of(context).colorScheme.outline.withOpacity(
|
||||
kHintOpacity,
|
||||
),
|
||||
),
|
||||
border: InputBorder.none,
|
||||
),
|
||||
onChanged: onChanged,
|
||||
onFieldSubmitted: onFieldSubmitted,
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user