Skip to content

Commit

Permalink
Merge branch 'main' into apply_path_prov
Browse files Browse the repository at this point in the history
  • Loading branch information
reidbaker authored Oct 30, 2024
2 parents 55f9c9d + bce9735 commit bf607c5
Show file tree
Hide file tree
Showing 135 changed files with 4,433 additions and 2,117 deletions.
2 changes: 1 addition & 1 deletion .ci/flutter_master.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6790525ce673734ef3a913e301a7001e2f500703
fe71cadf1959268ca5dd545863a195d78c232b74
2 changes: 1 addition & 1 deletion .ci/flutter_stable.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2663184aa79047d0a33a14a3b607954f8fdd8730
603104015dd692ea3403755b55d07813d5cf8965
5 changes: 5 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@
- any-glob-to-any-file:
- packages/palette_generator/**/*

'p: path_parsing':
- changed-files:
- any-glob-to-any-file:
- third_party/packages/path_parsing/**/*

'p: path_provider':
- changed-files:
- any-glob-to-any-file:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
cd $GITHUB_WORKSPACE
# Checks out a copy of the repo.
- name: Check out code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0 # Fetch all history so the tool can get all the tags to determine version.
- name: Set up tools
Expand Down
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ packages/webview_flutter/** @bparrishMines
packages/xdg_directories/** @stuartmorgan
third_party/packages/cupertino_icons/** @MitchellGoodwin
third_party/packages/cupertino_icons/test/goldens/** @LongCatIsLooong
third_party/packages/path_parsing/** @domesticmouse

# Plugin platform implementation rules. These should stay last, since the last
# matching entry takes precedence.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ These are the packages hosted in this repository:
| [metrics\_center](./packages/metrics_center/) | [![pub package](https://img.shields.io/pub/v/metrics_center.svg)](https://pub.dev/packages/metrics_center) | [![pub points](https://img.shields.io/pub/points/metrics_center)](https://pub.dev/packages/metrics_center/score) | [![popularity](https://img.shields.io/pub/popularity/metrics_center)](https://pub.dev/packages/metrics_center/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20metrics_center?label=)](https://github.com/flutter/flutter/labels/p%3A%20metrics_center) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20metrics_center?label=)](https://github.com/flutter/packages/labels/p%3A%20metrics_center) |
| [multicast\_dns](./packages/multicast_dns/) | [![pub package](https://img.shields.io/pub/v/multicast_dns.svg)](https://pub.dev/packages/multicast_dns) | [![pub points](https://img.shields.io/pub/points/multicast_dns)](https://pub.dev/packages/multicast_dns/score) | [![popularity](https://img.shields.io/pub/popularity/multicast_dns)](https://pub.dev/packages/multicast_dns/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20multicast_dns?label=)](https://github.com/flutter/flutter/labels/p%3A%20multicast_dns) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20multicast_dns?label=)](https://github.com/flutter/packages/labels/p%3A%20multicast_dns) |
| [palette\_generator](./packages/palette_generator/) | [![pub package](https://img.shields.io/pub/v/palette_generator.svg)](https://pub.dev/packages/palette_generator) | [![pub points](https://img.shields.io/pub/points/palette_generator)](https://pub.dev/packages/palette_generator/score) | [![popularity](https://img.shields.io/pub/popularity/palette_generator)](https://pub.dev/packages/palette_generator/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20palette_generator?label=)](https://github.com/flutter/flutter/labels/p%3A%20palette_generator) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20palette_generator?label=)](https://github.com/flutter/packages/labels/p%3A%20palette_generator) |
| [path\_parsing](./third_party/packages/path_parsing/) | [![pub package](https://img.shields.io/pub/v/path_parsing.svg)](https://pub.dev/packages/path_parsing) | [![pub points](https://img.shields.io/pub/points/path_parsing)](https://pub.dev/packages/path_parsing/score) | [![popularity](https://img.shields.io/pub/popularity/path_parsing)](https://pub.dev/packages/path_parsing/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20path_parsing?label=)](https://github.com/flutter/flutter/labels/p%3A%20path_parsing) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20path_parsing?label=)](https://github.com/flutter/packages/labels/p%3A%20path_parsing) |
| [path\_provider](./packages/path_provider/) | [![pub package](https://img.shields.io/pub/v/path_provider.svg)](https://pub.dev/packages/path_provider) | [![pub points](https://img.shields.io/pub/points/path_provider)](https://pub.dev/packages/path_provider/score) | [![popularity](https://img.shields.io/pub/popularity/path_provider)](https://pub.dev/packages/path_provider/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20path_provider?label=)](https://github.com/flutter/flutter/labels/p%3A%20path_provider) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20path_provider?label=)](https://github.com/flutter/packages/labels/p%3A%20path_provider) |
| [pigeon](./packages/pigeon/) | [![pub package](https://img.shields.io/pub/v/pigeon.svg)](https://pub.dev/packages/pigeon) | [![pub points](https://img.shields.io/pub/points/pigeon)](https://pub.dev/packages/pigeon/score) | [![popularity](https://img.shields.io/pub/popularity/pigeon)](https://pub.dev/packages/pigeon/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20pigeon?label=)](https://github.com/flutter/flutter/labels/p%3A%20pigeon) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20pigeon?label=)](https://github.com/flutter/packages/labels/p%3A%20pigeon) |
| [pointer\_interceptor](./packages/pointer_interceptor/) | [![pub package](https://img.shields.io/pub/v/pointer_interceptor.svg)](https://pub.dev/packages/pointer_interceptor) | [![pub points](https://img.shields.io/pub/points/pointer_interceptor)](https://pub.dev/packages/pointer_interceptor/score) | [![popularity](https://img.shields.io/pub/popularity/pointer_interceptor)](https://pub.dev/packages/pointer_interceptor/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20pointer_interceptor?label=)](https://github.com/flutter/flutter/labels/p%3A%20pointer_interceptor) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20pointer_interceptor?label=)](https://github.com/flutter/packages/labels/p%3A%20pointer_interceptor) |
Expand Down
2 changes: 0 additions & 2 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ linter:
- avoid_init_to_null
- avoid_js_rounded_ints
# - avoid_multiple_declarations_per_line # seems to be a stylistic choice we don't subscribe to
- avoid_null_checks_in_equality_operators
# - avoid_positional_boolean_parameters # would have been nice to enable this but by now there's too many places that break it
- avoid_print
# - avoid_private_typedef_functions # we prefer having typedef (discussion in https://github.com/flutter/flutter/pull/16356)
Expand Down Expand Up @@ -219,7 +218,6 @@ linter:
- unnecessary_to_list_in_spreads
- unreachable_from_main
- unrelated_type_equality_checks
- unsafe_html
- use_build_context_synchronously
- use_colored_box
# - use_decorated_box # leads to bugs: DecoratedBox and Container are not equivalent (Container inserts extra padding)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ import 'package:integration_test/integration_test.dart';
import 'package:path_provider/path_provider.dart';
import 'package:video_player/video_player.dart';

// Skip due to video_player error.
// See https://github.com/flutter/flutter/issues/157181
bool skipFor157181 = Platform.isAndroid;

void main() {
late Directory testDir;

Expand Down Expand Up @@ -177,7 +181,7 @@ void main() {
await videoController.dispose();

expect(duration, lessThan(recordingTime));
});
}, skip: skipFor157181);

testWidgets('Pause and resume video recording', (WidgetTester tester) async {
final List<CameraDescription> cameras = await availableCameras();
Expand Down Expand Up @@ -225,7 +229,7 @@ void main() {
await videoController.dispose();

expect(duration, lessThan(recordingTime - timePaused));
}, skip: !Platform.isAndroid);
}, skip: !Platform.isAndroid || skipFor157181);

testWidgets(
'Android image streaming',
Expand Down
4 changes: 4 additions & 0 deletions packages/camera/camera_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.10.9+16

* Updates annotations lib to 1.9.0.

## 0.10.9+15

* Converts Dart to native platform calls to Pigeon.
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera_android/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ buildFeatures {
}

dependencies {
implementation 'androidx.annotation:annotation:1.8.2'
implementation 'androidx.annotation:annotation:1.9.0'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-inline:5.0.0'
testImplementation 'androidx.test:core:1.4.0'
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera_android/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Android implementation of the camera plugin.
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22

version: 0.10.9+15
version: 0.10.9+16

environment:
sdk: ^3.5.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:video_player/video_player.dart';

// Skip due to video_player error.
// See https://github.com/flutter/flutter/issues/157181
const bool skipFor157181 = true;

void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();

Expand Down Expand Up @@ -210,7 +214,7 @@ void main() {
await videoController.dispose();

expect(duration, lessThan(postStopTime));
});
}, skip: skipFor157181);

testWidgets('Pause and resume video recording', (WidgetTester tester) async {
final List<CameraDescription> cameras = await availableCameras();
Expand Down Expand Up @@ -255,5 +259,5 @@ void main() {
await videoController.dispose();

expect(duration, lessThan(recordingTime - timePaused));
});
}, skip: skipFor157181);
}
1 change: 0 additions & 1 deletion packages/espresso/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ android {
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}

buildTypes {
Expand Down
4 changes: 4 additions & 0 deletions packages/file_selector/file_selector_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.5.1+10

* Bumps androidx.annotation:annotation from 1.8.2 to 1.9.0.

## 0.5.1+9

* Updates Java compatibility version to 11.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ android {
}

dependencies {
implementation 'androidx.annotation:annotation:1.8.2'
implementation 'androidx.annotation:annotation:1.9.0'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-inline:5.1.0'
testImplementation 'androidx.test:core:1.3.0'
Expand Down
2 changes: 1 addition & 1 deletion packages/file_selector/file_selector_android/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: file_selector_android
description: Android implementation of the file_selector package.
repository: https://github.com/flutter/packages/tree/main/packages/file_selector/file_selector_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+file_selector%22
version: 0.5.1+9
version: 0.5.1+10

environment:
sdk: ^3.5.0
Expand Down
5 changes: 5 additions & 0 deletions packages/flutter_markdown/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.7.4+1

* Makes it so that custom blocks are not limited to being a Column or
SizedBox.

## 0.7.4

* Makes paragraphs in blockquotes soft-wrap like a normal `<blockquote>` instead of hard-wrapping like a `<pre>` block.
Expand Down
31 changes: 20 additions & 11 deletions packages/flutter_markdown/lib/src/builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -383,20 +383,29 @@ class MarkdownBuilder implements md.NodeVisitor {
_addAnonymousBlockIfNeeded();

final _BlockElement current = _blocks.removeLast();
Widget child;

if (current.children.isNotEmpty) {
child = Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: fitContent
? CrossAxisAlignment.start
: CrossAxisAlignment.stretch,
children: current.children,
);
} else {
child = const SizedBox();
Widget defaultChild() {
if (current.children.isNotEmpty) {
return Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: fitContent
? CrossAxisAlignment.start
: CrossAxisAlignment.stretch,
children: current.children,
);
} else {
return const SizedBox();
}
}

Widget child = builders[tag]?.visitElementAfterWithContext(
delegate.context,
element,
styleSheet.styles[tag],
_inlines.isNotEmpty ? _inlines.last.style : null,
) ??
defaultChild();

if (_isListTag(tag)) {
assert(_listIndents.isNotEmpty);
_listIndents.removeLast();
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter_markdown/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: A Markdown renderer for Flutter. Create rich text output,
formatted with simple Markdown tags.
repository: https://github.com/flutter/packages/tree/main/packages/flutter_markdown
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+flutter_markdown%22
version: 0.7.4
version: 0.7.4+1

environment:
sdk: ^3.3.0
Expand Down
80 changes: 80 additions & 0 deletions packages/flutter_markdown/test/custom_syntax_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,35 @@ void defineTests() {
},
);

testWidgets(
'Block with custom tag',
(WidgetTester tester) async {
const String textBefore = 'Before ';
const String textAfter = ' After';
const String blockContent = 'Custom content rendered in a ColoredBox';

await tester.pumpWidget(
boilerplate(
Markdown(
data:
'$textBefore\n{{custom}}\n$blockContent\n{{/custom}}\n$textAfter',
extensionSet: md.ExtensionSet.none,
blockSyntaxes: <md.BlockSyntax>[CustomTagBlockSyntax()],
builders: <String, MarkdownElementBuilder>{
'custom': CustomTagBlockBuilder(),
},
),
),
);

final ColoredBox container =
tester.widgetList(find.byType(ColoredBox)).first as ColoredBox;
expect(container.color, Colors.red);
expect(container.child, isInstanceOf<Text>());
expect((container.child! as Text).data, blockContent);
},
);

testWidgets(
'link for wikistyle',
(WidgetTester tester) async {
Expand Down Expand Up @@ -380,3 +409,54 @@ class NoteSyntax extends md.BlockSyntax {
@override
RegExp get pattern => RegExp(r'^\[!NOTE] ');
}

class CustomTagBlockBuilder extends MarkdownElementBuilder {
@override
bool isBlockElement() => true;

@override
Widget visitElementAfterWithContext(
BuildContext context,
md.Element element,
TextStyle? preferredStyle,
TextStyle? parentStyle,
) {
if (element.tag == 'custom') {
final String content = element.attributes['content']!;
return ColoredBox(
color: Colors.red, child: Text(content, style: preferredStyle));
}
return const SizedBox.shrink();
}
}

class CustomTagBlockSyntax extends md.BlockSyntax {
@override
bool canParse(md.BlockParser parser) {
return parser.current.content.startsWith('{{custom}}');
}

@override
RegExp get pattern => RegExp(r'\{\{custom\}\}([\s\S]*?)\{\{/custom\}\}');

@override
md.Node parse(md.BlockParser parser) {
parser.advance();

final StringBuffer buffer = StringBuffer();
while (
!parser.current.content.startsWith('{{/custom}}') && !parser.isDone) {
buffer.writeln(parser.current.content);
parser.advance();
}

if (!parser.isDone) {
parser.advance();
}

final String content = buffer.toString().trim();
final md.Element element = md.Element.empty('custom');
element.attributes['content'] = content;
return element;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ android {
applicationId "io.flutter.plugins.googlemapsexample"
minSdkVersion 20
targetSdkVersion 28
multiDexEnabled true
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ android {
applicationId "io.flutter.plugins.googlemapsexample"
minSdkVersion flutter.minSdkVersion
targetSdkVersion 34
multiDexEnabled true
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ gmaps.InfoWindowOptions? _infoWindowOptionsFromMarker(Marker marker) {
// XSS attacks through the contents of the marker InfoWindow.
// See: https://pub.dev/documentation/sanitize_html/latest/sanitize_html/sanitizeHtml.html
// See: b/159137885, b/159598165
// ignore: unsafe_html
snippet.innerHTMLString = sanitizeHtml(markerSnippet);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ android {
applicationId "io.flutter.plugins.googlesigninexample"
minSdkVersion flutter.minSdkVersion
targetSdkVersion 28
multiDexEnabled true
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ android {
applicationId "io.flutter.plugins.googlesigninexample"
minSdkVersion flutter.minSdkVersion
targetSdkVersion 34
multiDexEnabled true
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ android {
applicationId "io.flutter.plugins.imagepicker.example"
minSdkVersion flutter.minSdkVersion
targetSdkVersion 28
multiDexEnabled true
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
4 changes: 4 additions & 0 deletions packages/image_picker/image_picker_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.8.12+17

* Bumps androidx.annotation:annotation from 1.8.2 to 1.9.0.

## 0.8.12+16

* Updates Pigeon for non-nullable collection type support.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ android {
}
dependencies {
implementation 'androidx.core:core:1.13.1'
implementation 'androidx.annotation:annotation:1.8.2'
implementation 'androidx.annotation:annotation:1.9.0'
implementation 'androidx.exifinterface:exifinterface:1.3.7'
implementation 'androidx.activity:activity:1.9.2'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ android {
applicationId "io.flutter.plugins.imagepicker.example"
minSdkVersion flutter.minSdkVersion
targetSdkVersion 34
multiDexEnabled true
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
Loading

0 comments on commit bf607c5

Please sign in to comment.