Hint constants

This commit is contained in:
Ashita Prasad
2025-01-12 16:38:27 +05:30
parent 18f4687d30
commit 2c2db4ff21
4 changed files with 11 additions and 5 deletions

View File

@ -454,6 +454,10 @@ const kLabelAddHeader = "Add Header";
const kLabelAddVariable = "Add Variable"; const kLabelAddVariable = "Add Variable";
const kLabelSelectFile = "Select File"; const kLabelSelectFile = "Select File";
const kLabelAddFormField = "Add Form Field"; const kLabelAddFormField = "Add Form Field";
const kHintContent = "Enter content";
const kHintText = "Enter text";
const kHintJson = "Enter JSON";
const kHintQuery = "Enter Query";
// Response Pane // Response Pane
const kLabelNotSent = "Not Sent"; const kLabelNotSent = "Not Sent";
const kLabelResponse = "Response"; const kLabelResponse = "Response";

View File

@ -74,7 +74,7 @@ class EditRequestBody extends ConsumerWidget {
.read(collectionStateNotifierProvider.notifier) .read(collectionStateNotifierProvider.notifier)
.update(body: value); .update(body: value);
}, },
hintText: "Enter JSON", hintText: kHintJson,
), ),
), ),
_ => Padding( _ => Padding(
@ -89,7 +89,7 @@ class EditRequestBody extends ConsumerWidget {
.read(collectionStateNotifierProvider.notifier) .read(collectionStateNotifierProvider.notifier)
.update(body: value); .update(body: value);
}, },
hintText: "Enter text", hintText: kHintText,
), ),
), ),
}, },
@ -106,7 +106,7 @@ class EditRequestBody extends ConsumerWidget {
.read(collectionStateNotifierProvider.notifier) .read(collectionStateNotifierProvider.notifier)
.update(query: value); .update(query: value);
}, },
hintText: "Enter Query", hintText: kHintQuery,
), ),
), ),
), ),

View File

@ -1,4 +1,5 @@
import 'dart:math' as math; import 'dart:math' as math;
import 'package:apidash/consts.dart';
import 'package:apidash_design_system/apidash_design_system.dart'; import 'package:apidash_design_system/apidash_design_system.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
@ -83,7 +84,7 @@ class _TextFieldEditorState extends State<TextFieldEditor> {
editorFocusNode.unfocus(); editorFocusNode.unfocus();
}, },
decoration: InputDecoration( decoration: InputDecoration(
hintText: widget.hintText ?? "Enter content", hintText: widget.hintText ?? kHintContent,
hintStyle: TextStyle( hintStyle: TextStyle(
color: Theme.of(context).colorScheme.outline.withOpacity( color: Theme.of(context).colorScheme.outline.withOpacity(
kHintOpacity, kHintOpacity,

View File

@ -1,4 +1,5 @@
import 'dart:math' as math; import 'dart:math' as math;
import 'package:apidash/consts.dart';
import 'package:apidash_design_system/apidash_design_system.dart'; import 'package:apidash_design_system/apidash_design_system.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
@ -93,7 +94,7 @@ class _JsonTextFieldEditorState extends State<JsonTextFieldEditor> {
widget.onChanged?.call(value); widget.onChanged?.call(value);
}, },
decoration: InputDecoration( decoration: InputDecoration(
hintText: "Enter content (body)", hintText: kHintJson,
hintStyle: TextStyle( hintStyle: TextStyle(
color: Theme.of(context).colorScheme.outline.withOpacity( color: Theme.of(context).colorScheme.outline.withOpacity(
kHintOpacity, kHintOpacity,