Skip to content

Fix CI #1466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 11, 2025
Merged

Fix CI #1466

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Test flutter_html

on:
pull_request:
branches: [ main ]
branches: [ master ]
push:
branches: [ main ]
branches: [ master ]

jobs:
test:
Expand All @@ -16,7 +16,7 @@ jobs:
- name: Setup Melos
run: flutter pub global activate melos
- name: Bootstrap Project
run: flutter pub global run melos bootstrap
run: melos bootstrap
- name: Run Test Suite
run: flutter pub global run melos run test
- name: Compile Test Coverage Report
Expand All @@ -30,4 +30,4 @@ jobs:
- name: Run Dart Analysis
run: flutter pub global run melos analyze --fatal-infos
- name: Check that `dart format` has been run on every file
run: dart format -o none --set-exit-if-changed
run: dart format -o none --set-exit-if-changed .
6 changes: 2 additions & 4 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ environment:
sdk: '>=3.2.0 <4.0.0'

dependencies:
flutter_html:
path: ..
flutter_html_all:
path: ../packages/flutter_html_all
flutter_html: ^3.0.0-beta.2
flutter_html_all: ^3.0.0-beta.2
flutter:
sdk: flutter

Expand Down
7 changes: 3 additions & 4 deletions packages/flutter_html_iframe/lib/iframe_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_html_iframe/shims/dart_ui.dart' as ui;
// ignore: avoid_web_libraries_in_flutter
import 'dart:html' as html;
import 'package:web/web.dart' show HTMLIFrameElement;

import 'package:webview_flutter/webview_flutter.dart';

Expand All @@ -25,10 +24,10 @@ class IframeWidget extends StatelessWidget {
double.tryParse(extensionContext.attributes['width'] ?? "");
final givenHeight =
double.tryParse(extensionContext.attributes['height'] ?? "");
final html.IFrameElement iframe = html.IFrameElement()
final HTMLIFrameElement iframe = HTMLIFrameElement()
..width = (givenWidth ?? (givenHeight ?? 150) * 2).toString()
..height = (givenHeight ?? (givenWidth ?? 300) / 2).toString()
..src = extensionContext.attributes['src']
..src = extensionContext.attributes['src'] ?? ""
..style.border = 'none';
final String createdViewId = _getRandString(10);
ui.platformViewRegistry
Expand Down
1 change: 1 addition & 0 deletions packages/flutter_html_iframe/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dependencies:
sdk: flutter
html: '>=0.15.0 <1.0.0'
flutter_html: ^3.0.0-beta.2
web: '>=1.1.1 < 2.0.0'
webview_flutter: '>=4.0.0 <5.0.0'

dev_dependencies:
Expand Down