Skip to content

Commit 0cdb3bf

Browse files
authored
Export public API types from foundation/*.dart library. (#105648)
1 parent ac97988 commit 0cdb3bf

File tree

13 files changed

+21
-9
lines changed

13 files changed

+21
-9
lines changed

packages/flutter/lib/src/cupertino/text_theme.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// found in the LICENSE file.
44

55
import 'package:flutter/foundation.dart';
6-
import 'package:flutter/services.dart' show Brightness;
76
import 'package:flutter/widgets.dart';
87

98
import 'colors.dart';

packages/flutter/lib/src/cupertino/theme.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33
// found in the LICENSE file.
44

55
import 'package:flutter/foundation.dart';
6-
import 'package:flutter/services.dart';
76
import 'package:flutter/widgets.dart';
87

98
import 'colors.dart';
109
import 'icon_theme_data.dart';
1110
import 'text_theme.dart';
1211

13-
export 'package:flutter/services.dart' show Brightness;
12+
export 'package:flutter/foundation.dart' show Brightness;
1413

1514
// Values derived from https://developer.apple.com/design/resources/.
1615
const _CupertinoThemeDefaults _kDefaultTheme = _CupertinoThemeDefaults(

packages/flutter/lib/src/foundation/_isolates_io.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import 'package:meta/meta.dart';
1010
import 'constants.dart';
1111
import 'isolates.dart' as isolates;
1212

13+
export 'isolates.dart' show ComputeCallback;
14+
1315
/// The dart:io implementation of [isolate.compute].
1416
Future<R> compute<Q, R>(isolates.ComputeCallback<Q, R> callback, Q message, { String? debugLabel }) async {
1517
debugLabel ??= kReleaseMode ? 'compute' : callback.toString();

packages/flutter/lib/src/foundation/_isolates_web.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
import 'isolates.dart' as isolates;
66

7+
export 'isolates.dart' show ComputeCallback;
8+
79
/// The dart:html implementation of [isolate.compute].
810
Future<R> compute<Q, R>(isolates.ComputeCallback<Q, R> callback, Q message, { String? debugLabel }) async {
911
// To avoid blocking the UI immediately for an expensive function call, we

packages/flutter/lib/src/foundation/assertions.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ import 'diagnostics.dart';
1010
import 'print.dart';
1111
import 'stack_frame.dart';
1212

13+
export 'basic_types.dart' show IterableFilter;
14+
export 'diagnostics.dart' show DiagnosticLevel, DiagnosticsNode, DiagnosticPropertiesBuilder, DiagnosticsTreeStyle;
15+
export 'stack_frame.dart' show StackFrame;
16+
1317
// Examples can assume:
1418
// late String runtimeType;
1519
// late bool draconisAlive;

packages/flutter/lib/src/foundation/binding.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ import 'assertions.dart';
1414
import 'basic_types.dart';
1515
import 'constants.dart';
1616
import 'debug.dart';
17-
import 'diagnostics.dart';
1817
import 'object.dart';
1918
import 'platform.dart';
2019
import 'print.dart';
2120

21+
export 'basic_types.dart' show AsyncCallback, AsyncValueGetter, AsyncValueSetter;
22+
2223
// Examples can assume:
2324
// mixin BarBinding on BindingBase { }
2425

packages/flutter/lib/src/foundation/change_notifier.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import 'assertions.dart';
88
import 'basic_types.dart';
99
import 'diagnostics.dart';
1010

11+
export 'dart:ui' show VoidCallback;
12+
1113
/// An object that maintains a list of listeners.
1214
///
1315
/// The listeners are typically used to notify clients that the object has been

packages/flutter/lib/src/foundation/consolidate_response.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ import 'dart:convert';
77
import 'dart:io';
88
import 'dart:typed_data';
99

10+
export 'dart:io' show HttpClientResponse;
11+
export 'dart:typed_data' show Uint8List;
12+
1013
/// Signature for getting notified when chunks of bytes are received while
1114
/// consolidating the bytes of an [HttpClientResponse] into a [Uint8List].
1215
///

packages/flutter/lib/src/foundation/debug.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ import 'assertions.dart';
88
import 'platform.dart';
99
import 'print.dart';
1010

11+
export 'dart:ui' show Brightness;
12+
13+
export 'print.dart' show DebugPrintCallback;
14+
1115
/// Returns true if none of the foundation library debug variables have been
1216
/// changed.
1317
///

packages/flutter/lib/src/foundation/serialization.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import 'dart:math' as math;
66
import 'dart:typed_data';
77

8-
export 'dart:typed_data' show ByteData, Float32List, Float64List, Int32List, Int64List, Uint8List;
8+
export 'dart:typed_data' show ByteData, Endian, Float32List, Float64List, Int32List, Int64List, Uint8List;
99

1010
/// Write-only buffer for incrementally building a [ByteData] instance.
1111
///

packages/flutter/lib/src/services/text_input.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import 'autofill.dart';
2020
import 'message_codec.dart';
2121
import 'platform_channel.dart';
2222
import 'system_channels.dart';
23-
import 'system_chrome.dart';
2423
import 'text_editing.dart';
2524
import 'text_editing_delta.dart';
2625

packages/flutter/lib/src/widgets/media_query.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import 'dart:math' as math;
66
import 'dart:ui' as ui;
7-
import 'dart:ui' show Brightness;
87

98
import 'package:flutter/foundation.dart';
109
import 'package:flutter/gestures.dart';

packages/flutter/test/foundation/serialization_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
import 'dart:typed_data';
6-
75
import 'package:flutter/foundation.dart';
86
import 'package:flutter_test/flutter_test.dart';
97

0 commit comments

Comments
 (0)