Skip to content

Commit

Permalink
Merge branch 'main' into camx_90_repro
Browse files Browse the repository at this point in the history
  • Loading branch information
reidbaker authored Sep 30, 2024
2 parents 1a95f92 + 27c9853 commit e226883
Show file tree
Hide file tree
Showing 33 changed files with 1,305 additions and 630 deletions.
2 changes: 1 addition & 1 deletion .ci/flutter_master.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
538e7424d0180d2433534a30a5f6c34e8bca6181
fa402c8057a11481b834c478cb8374df9bbc0819
4 changes: 4 additions & 0 deletions packages/flutter_markdown/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.7.3+2

* Resolves an issue where code blocks in markdown were not highlighted during selection.

## 0.7.3+1

* Fixes issue with table column alignments not being respected.
Expand Down
7 changes: 2 additions & 5 deletions packages/flutter_markdown/lib/src/style_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class MarkdownStyleSheet {
p: theme.textTheme.bodyMedium,
pPadding: EdgeInsets.zero,
code: theme.textTheme.bodyMedium!.copyWith(
backgroundColor: theme.cardTheme.color ?? theme.cardColor,
backgroundColor: theme.cardTheme.color,
fontFamily: 'monospace',
fontSize: theme.textTheme.bodyMedium!.fontSize! * 0.85,
),
Expand Down Expand Up @@ -175,9 +175,6 @@ class MarkdownStyleSheet {
p: theme.textTheme.textStyle,
pPadding: EdgeInsets.zero,
code: theme.textTheme.textStyle.copyWith(
backgroundColor: theme.brightness == Brightness.dark
? CupertinoColors.systemGrey6.darkColor
: CupertinoColors.systemGrey6.color,
fontFamily: 'monospace',
fontSize: theme.textTheme.textStyle.fontSize! * 0.85,
),
Expand Down Expand Up @@ -284,7 +281,7 @@ class MarkdownStyleSheet {
p: theme.textTheme.bodyMedium,
pPadding: EdgeInsets.zero,
code: theme.textTheme.bodyMedium!.copyWith(
backgroundColor: theme.cardTheme.color ?? theme.cardColor,
backgroundColor: theme.cardTheme.color,
fontFamily: 'monospace',
fontSize: theme.textTheme.bodyMedium!.fontSize! * 0.85,
),
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.3+1
version: 0.7.3+2

environment:
sdk: ^3.3.0
Expand Down
4 changes: 1 addition & 3 deletions packages/flutter_markdown/test/style_sheet_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ void defineTests() {
expect(
style.code!.fontSize, cTheme.textTheme.textStyle.fontSize! * 0.85);
expect(style.code!.fontFamily, 'monospace');
expect(
style.code!.backgroundColor, CupertinoColors.systemGrey6.darkColor);

// H1
expect(style.h1!.color, cTheme.textTheme.textStyle.color);
Expand Down Expand Up @@ -152,7 +150,7 @@ void defineTests() {
expect(
style.code!.fontSize, theme.textTheme.bodyMedium!.fontSize! * 0.85);
expect(style.code!.fontFamily, 'monospace');
expect(style.code!.backgroundColor, theme.cardColor);
expect(style.code!.backgroundColor, theme.cardTheme.color);

// H1
expect(style.h1, theme.textTheme.headlineSmall);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.9.3

* Corrects an incorrect comment in polyline.dart file.

## 2.9.2

* Corrects JSON tag for `CameraUpdateNewLatLngBounds`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class Polyline implements MapsObject<Polyline> {
/// Supported on Android only.
final Cap endCap;

/// True if the marker is visible.
/// True if the polyline is visible.
final bool visible;

/// Width of the polyline, used to define the width of the line segment to be drawn.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repository: https://github.com/flutter/packages/tree/main/packages/google_maps_f
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 2.9.2
version: 2.9.3

environment:
sdk: ^3.3.0
Expand Down
4 changes: 4 additions & 0 deletions packages/interactive_media_ads/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.2.2+3

* Adds internal wrapper for iOS native `IMAFriendlyObstruction`.

## 0.2.2+2

* Adds internal wrapper for Android native `AdsRenderingSettings`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class AdsRequestProxyApi(override val pigeonRegistrar: ProxyApiRegistrar) :
*
* This must match the version in pubspec.yaml.
*/
const val pluginVersion = "0.2.2+2"
const val pluginVersion = "0.2.2+3"
}

override fun setAdTagUrl(pigeon_instance: AdsRequest, adTagUrl: String) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
8F977DD72C2C89A600A90D4B /* AdEventTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F977DD62C2C89A600A90D4B /* AdEventTests.swift */; };
8F977DD92C2C8C6A00A90D4B /* AdLoadingErrorDataTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F977DD82C2C8C6A00A90D4B /* AdLoadingErrorDataTests.swift */; };
8F977DDB2C2C8D2E00A90D4B /* AdsLoadedDataTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F977DDA2C2C8D2E00A90D4B /* AdsLoadedDataTests.swift */; };
8FC919922CA5D86F00188068 /* FriendlyObstructionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FC919912CA5D86F00188068 /* FriendlyObstructionTests.swift */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
Expand Down Expand Up @@ -83,6 +84,7 @@
8F977DD62C2C89A600A90D4B /* AdEventTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdEventTests.swift; sourceTree = "<group>"; };
8F977DD82C2C8C6A00A90D4B /* AdLoadingErrorDataTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdLoadingErrorDataTests.swift; sourceTree = "<group>"; };
8F977DDA2C2C8D2E00A90D4B /* AdsLoadedDataTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdsLoadedDataTests.swift; sourceTree = "<group>"; };
8FC919912CA5D86F00188068 /* FriendlyObstructionTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FriendlyObstructionTests.swift; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -116,6 +118,7 @@
331C8082294A63A400263BE5 /* RunnerTests */ = {
isa = PBXGroup;
children = (
8FC919912CA5D86F00188068 /* FriendlyObstructionTests.swift */,
8F977DCE2C2B99C600A90D4B /* AdDisplayContainerTests.swift */,
8F977DD22C2BA15100A90D4B /* TestProxyApiRegistrar.swift */,
8F977DD42C2C777600A90D4B /* AdErrorTests.swift */,
Expand Down Expand Up @@ -408,6 +411,7 @@
buildActionMask = 2147483647;
files = (
8F599BBF2C3335B40090A0DF /* ViewControllerTests.swift in Sources */,
8FC919922CA5D86F00188068 /* FriendlyObstructionTests.swift in Sources */,
8F977DD92C2C8C6A00A90D4B /* AdLoadingErrorDataTests.swift in Sources */,
8F599BB32C2DD87D0090A0DF /* AdsLoaderTests.swift in Sources */,
8F977DD72C2C89A600A90D4B /* AdEventTests.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// Copyright 2013 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 Flutter
import GoogleInteractiveMediaAds
import UIKit
import XCTest

@testable import interactive_media_ads

class FriendlyObstructionProxyApiTests: XCTestCase {
func testPigeonDefaultConstructor() {
let registrar = TestProxyApiRegistrar()
let api = registrar.apiDelegate.pigeonApiIMAFriendlyObstruction(registrar)

let instance = try? api.pigeonDelegate.pigeonDefaultConstructor(
pigeonApi: api, view: UIView(), purpose: .mediaControls, detailedReason: "myString")
XCTAssertNotNil(instance)
}

func testPigeonDefaultConstructorWithUnknownPurpose() {
let registrar = TestProxyApiRegistrar()
let api = registrar.apiDelegate.pigeonApiIMAFriendlyObstruction(registrar)

XCTAssertThrowsError(
try api.pigeonDelegate.pigeonDefaultConstructor(
pigeonApi: api, view: UIView(), purpose: .unknown, detailedReason: "myString")
) { error in
XCTAssertTrue(error is PigeonError)
}
}

func testView() {
let registrar = TestProxyApiRegistrar()
let api = registrar.apiDelegate.pigeonApiIMAFriendlyObstruction(registrar)

let instance = IMAFriendlyObstruction(
view: UIView(), purpose: IMAFriendlyObstructionPurpose.closeAd, detailedReason: "reason")
let value = try? api.pigeonDelegate.view(pigeonApi: api, pigeonInstance: instance)

XCTAssertEqual(value, instance.view)
}

func testPurpose() {
let registrar = TestProxyApiRegistrar()
let api = registrar.apiDelegate.pigeonApiIMAFriendlyObstruction(registrar)

let instance = IMAFriendlyObstruction(
view: UIView(), purpose: IMAFriendlyObstructionPurpose.closeAd, detailedReason: "reason")
let value = try? api.pigeonDelegate.purpose(pigeonApi: api, pigeonInstance: instance)

XCTAssertEqual(value, FriendlyObstructionPurpose.closeAd)
}

func testDetailedReason() {
let registrar = TestProxyApiRegistrar()
let api = registrar.apiDelegate.pigeonApiIMAFriendlyObstruction(registrar)

let instance = IMAFriendlyObstruction(
view: UIView(), purpose: IMAFriendlyObstructionPurpose.closeAd, detailedReason: "reason")
let value = try? api.pigeonDelegate.detailedReason(pigeonApi: api, pigeonInstance: instance)

XCTAssertEqual(value, instance.detailedReason)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class AdsRequestProxyAPIDelegate: PigeonApiDelegateIMAAdsRequest {
/// The current version of the `interactive_media_ads` plugin.
///
/// This must match the version in pubspec.yaml.
static let pluginVersion = "0.2.2+2"
static let pluginVersion = "0.2.2+3"

func pigeonDefaultConstructor(
pigeonApi: PigeonApiIMAAdsRequest, adTagUrl: String, adDisplayContainer: IMAAdDisplayContainer,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// Copyright 2013 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 Foundation
import GoogleInteractiveMediaAds
import UIKit

/// ProxyApi implementation for [IMAFriendlyObstruction].
///
/// This class may handle instantiating native object instances that are attached to a Dart instance
/// or handle method calls on the associated native class or an instance of that class.
class FriendlyObstructionProxyAPIDelegate: PigeonApiDelegateIMAFriendlyObstruction {
func pigeonDefaultConstructor(
pigeonApi: PigeonApiIMAFriendlyObstruction, view: UIView, purpose: FriendlyObstructionPurpose,
detailedReason: String?
) throws -> IMAFriendlyObstruction {
var nativePurpose: IMAFriendlyObstructionPurpose
switch purpose {
case .mediaControls:
nativePurpose = IMAFriendlyObstructionPurpose.mediaControls
case .closeAd:
nativePurpose = IMAFriendlyObstructionPurpose.closeAd
case .notVisible:
nativePurpose = IMAFriendlyObstructionPurpose.notVisible
case .other:
nativePurpose = IMAFriendlyObstructionPurpose.other
case .unknown:
throw (pigeonApi.pigeonRegistrar.apiDelegate as! ProxyApiDelegate).createUnknownEnumError(
withEnum: purpose)
}
return IMAFriendlyObstruction(
view: view, purpose: nativePurpose, detailedReason: detailedReason)
}

func view(pigeonApi: PigeonApiIMAFriendlyObstruction, pigeonInstance: IMAFriendlyObstruction)
throws -> UIView
{
return pigeonInstance.view
}

func purpose(pigeonApi: PigeonApiIMAFriendlyObstruction, pigeonInstance: IMAFriendlyObstruction)
throws -> FriendlyObstructionPurpose
{
switch pigeonInstance.purpose {
case .mediaControls:
return .mediaControls
case .closeAd:
return .closeAd
case .notVisible:
return .notVisible
case .other:
return .other
@unknown default:
return .unknown
}
}

func detailedReason(
pigeonApi: PigeonApiIMAFriendlyObstruction, pigeonInstance: IMAFriendlyObstruction
) throws -> String? {
return pigeonInstance.detailedReason
}
}
Loading

0 comments on commit e226883

Please sign in to comment.