简体   繁体   中英

How to find the resource id for a textfield in Flutter?

I would like to register the test account credentials for the Pre-launch report in Google Play. In addition to the username and password, I need to provide resource IDs.

I would like to know how I could obtain the resource ID in a Flutter project to add it to the Pre-launch report.

Google Play Console screenshot

Grateful for any help out there !

Try use widget key. Example :

TextFormField(
  key: const Key('username'),
  controller: controller,
  decoration: InputDecoration(
    hintText: label,
    suffixIcon: suffixIcon,
    filled: true,
    errorStyle: TextStyle(
      color: Colors.red[400],
      fontWeight: FontWeight.bold,
      fontSize: 13,
    ),
  ),
),

Also you can test in Firebase test lab to confirm does it work or not before actually submiting your app in goog

You can give controller name as resource name

code ->

TextEditingController emailController = TextEditingController();

TextField(
                controller: emailController,
                keyboardType: inputType ?? TextInputType.name,
                obscureText: isObSecure ?? false,
                autofocus: autoFocus ?? false,
                onTap: onTap,
                
                decoration: InputDecoration(
                  
                  border: InputBorder.none,
                  hintText: hint,
                  hintStyle: TextStyle(
                    color: AppColors.onSurfaceColor.withOpacity(.4),
                  ),
                  // contentPadding: EdgeInsets.only(bottom: 8),
                ),
              ),

图片来自谷歌播放控制台

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM