mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
## Description This PR renames the DropdownButtonFormField constuctor parameter 'value' to 'initialValue'. See https://github.com/flutter/flutter/pull/170050#issuecomment-2965486000 and https://github.com/flutter/flutter/pull/170050#issuecomment-2971920009 for some context. ## Related Issue Fixes [DropdownButtonFormField retains selected value even after setting value to null](https://github.com/flutter/flutter/issues/169983#top) ## Tests Adds 2 tests (one to validate the deprecated parameter can still be used, one for the dart fix). Updates many (renaming the confusing parameter).
11 lines
332 B
Dart
11 lines
332 B
Dart
// Copyright 2014 The Flutter Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
void main() {
|
|
// Changes made in https://github.com/flutter/flutter/pull/170805.
|
|
DropdownButtonFormField(value: 'one');
|
|
}
|