Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ponnamkarthik committed Apr 14, 2024
2 parents 92c6e68 + 7399508 commit 088f891
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ android {
}

defaultConfig {
minSdkVersion 21
minSdkVersion 19
targetSdkVersion 33
if (project.android.hasProperty('namespace')) {
namespace 'io.github.ponnamkarthik.toast.fluttertoast'
Expand Down
2 changes: 1 addition & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ android {
applicationId "com.example.example"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
minSdkVersion 21
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand Down
14 changes: 14 additions & 0 deletions ios/Resources/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyTrackingDomains</key>
<array/>
<key>NSPrivacyAccessedAPITypes</key>
<array/>
<key>NSPrivacyCollectedDataTypes</key>
<array/>
<key>NSPrivacyTracking</key>
<false/>
</dict>
</plist>
2 changes: 1 addition & 1 deletion ios/fluttertoast.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ Toast Library for FLutter
s.dependency 'Flutter'
s.dependency 'Toast'
s.pod_target_xcconfig = {'VALID_ARCHS' => 'x86_64 armv7 arm64', 'DEFINES_MODULE' => 'YES'}
s.resource_bundles = {'fluttertoast_privacy' => ['Resources/PrivacyInfo.xcprivacy']}
end

10 changes: 4 additions & 6 deletions lib/fluttertoast_web.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:async';
import 'dart:html' as html;
import 'dart:ui' as ui;
import 'dart:ui_web' as ui;
import 'package:flutter/services.dart';
import 'package:flutter_web_plugins/flutter_web_plugins.dart';

Expand Down Expand Up @@ -71,18 +71,16 @@ class FluttertoastWebPlugin {
final List<Future<void>> loading = <Future<void>>[];
final List<html.HtmlElement> tags = <html.HtmlElement>[];

// ignore: undefined_prefixed_name
final cssUrl = ui.webOnlyAssetManager.getAssetUrl(
final cssUrl = ui.assetManager.getAssetUrl(
'packages/fluttertoast/assets/toastify.css',
);
final html.LinkElement css = html.LinkElement()
..id = 'toast-css'
..attributes = {"rel": "stylesheet"}
..href = cssUrl;
tags.add(css);

// ignore: undefined_prefixed_name
final jsUrl = ui.webOnlyAssetManager.getAssetUrl(

final jsUrl = ui.assetManager.getAssetUrl(
'packages/fluttertoast/assets/toastify.js',
);
final html.ScriptElement script = html.ScriptElement()
Expand Down

0 comments on commit 088f891

Please sign in to comment.