Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
0613a49
updated dependencies, added macos initial support
pichillilorenzo Sep 23, 2024
334f543
updated android platform
pichillilorenzo Sep 26, 2024
1dd1ff8
updated code for initial windows support
pichillilorenzo Sep 27, 2024
5324cbe
dep upgraded, fixed missing go back button for Windows
pichillilorenzo Sep 27, 2024
572dbfc
updated flutter_inappwebview, added support for pause and resume on w…
pichillilorenzo Sep 28, 2024
cedaa6c
implemented initial desktop app bar
pichillilorenzo Sep 28, 2024
9dc8cce
updated desktop app bar for Windows
pichillilorenzo Sep 28, 2024
26c9342
updated flutter_inappwebview version
pichillilorenzo Sep 29, 2024
5adbb62
updated app version
pichillilorenzo Sep 29, 2024
445db9f
updated dekstop implementation, added minimal multi-window support
pichillilorenzo Sep 30, 2024
53d73c4
use sqflite instead of shared_preferences
pichillilorenzo Sep 30, 2024
db1bc3a
updated search url logic, updated WebViewTabSelector title
pichillilorenzo Sep 30, 2024
4221bcf
implemented initial OpenTabsViewer
pichillilorenzo Sep 30, 2024
20bae1b
created custom_app_bar_wrapper, added custom app bar in other pages
pichillilorenzo Oct 1, 2024
5ae2188
added .github/workflows/main.yml
pichillilorenzo Oct 2, 2024
c6b2cdc
app version updated
pichillilorenzo Oct 2, 2024
6aaad1a
updated main.yml
pichillilorenzo Oct 2, 2024
811f2f7
updated main.yml
pichillilorenzo Oct 2, 2024
c5759c5
updated .github/workflows/main.yml, removed share_extend dependency
pichillilorenzo Oct 2, 2024
ff0c89f
added make_config.yaml for macos and windows
pichillilorenzo Oct 2, 2024
6ce3281
updated .github/workflows/main.yml, and fixed windows/packaging/msix/…
pichillilorenzo Oct 2, 2024
a637d36
updated .github/workflows/main.yml
pichillilorenzo Oct 2, 2024
67d6844
updated .github/workflows/main.yml
pichillilorenzo Oct 2, 2024
05ff51f
added desktop_multi_window dependency, select all text on search url …
pichillilorenzo Oct 6, 2024
f157903
moved to window_manager_plus plugin
pichillilorenzo Oct 8, 2024
0144528
updated windows multi-window support
pichillilorenzo Oct 8, 2024
0a2c6c2
updated readme
pichillilorenzo Oct 8, 2024
2377098
applied workaround for macos https://github.com/pichillilorenzo/windo…
pichillilorenzo Oct 25, 2024
799bcf0
Fix GlobalKey crashes in WebView tabs - Resolves #35
neerajgawane Mar 17, 2025
42ec0aa
Implement DOM inspector feature and fix whitelist typo
neerajgawane Mar 25, 2025
8ac4765
Merge parent repo code and fix conflicts
neerajgawane Apr 1, 2025
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
167 changes: 167 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
name: "Build & Release"

on:
push:
tags:
- "v*"

jobs:
build-mac-ios-android:
runs-on: macos-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: master

- name: Download Android keystore
id: android_keystore
uses: timheuer/base64-to-file@v1.2
with:
fileName: keystore.jks
encodedString: ${{ secrets.KEYSTORE_BASE64 }}
- name: Create key.properties
run: |
echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > android/key.properties
echo "storePassword=${{ secrets.KEYSTORE_PASSWORD }}" >> android/key.properties
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties

- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: "17"
cache: 'gradle'

- name: Flutter action
uses: subosito/flutter-action@v2
with:
flutter-version: '3.24.x'
cache: true

- name: Restore packages
run: |
flutter pub get

- name: Install appdmg
run: npm install -g appdmg

- name: Install flutter_distributor
run: dart pub global activate flutter_distributor

- name: Build APK
run: |
flutter build apk --release --split-per-abi

- name: Upload APK to Artifacts
uses: actions/upload-artifact@v3
with:
name: android
path: |
build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk
build/app/outputs/flutter-apk/app-arm64-v8a-release.apk
build/app/outputs/flutter-apk/app-x86_64-release.apk

- name: Build IPA
run: |
flutter build ios --release --no-codesign

- name: Create IPA
run: |
mkdir build/ios/iphoneos/Payload
cp -R build/ios/iphoneos/Runner.app build/ios/iphoneos/Payload/Runner.app
cd build/ios/iphoneos/
zip -q -r ios_no_sign.ipa Payload
cd ../../..

- name: Upload IPA to Artifacts
uses: actions/upload-artifact@v3
with:
name: ios
path: |
build/ios/iphoneos/ios_no_sign.ipa

- name: Build MacOS
run: |
flutter_distributor package --platform macos --targets dmg,zip --skip-clean

- name: Upload MacOS to Artifacts
uses: actions/upload-artifact@v4
with:
name: mac
path: |
dist/*/*.dmg
dist/*/*.zip

- name: Extract version from pubspec.yaml
id: yq
run: |
yq -r '.version' 'pubspec.yaml'

- name: Upload Release
uses: softprops/action-gh-release@v2
with:
name: "${{ steps.yq.outputs.result }}"
token: ${{ secrets.TOKEN }}
files: |
build/app/outputs/flutter-apk/app-x86_64-release.apk
build/app/outputs/flutter-apk/app-arm64-v8a-release.apk
build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk
build/ios/iphoneos/ios_no_sign.ipa
dist/*/*.dmg
dist/*/*.zip

- run: echo "🍏 This job's status is ${{ job.status }}."

build-windows:
runs-on: windows-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: master

- name: Install yq command line utility
run: choco install yq

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.24.x"
cache: true
- name: Restore Packages
run: |
flutter pub get

- name: Install flutter_distributor
run: dart pub global activate flutter_distributor

- name: Build Windows
run: |
flutter_distributor package --platform windows --targets msix,zip --skip-clean

- name: Upload Windows APP to Artifacts
uses: actions/upload-artifact@v4
with:
name: windows
path: |
dist/*/*.msix
dist/*/*.zip

- name: Extract version from pubspec.yaml
id: yq
run: |
yq -r '.version' 'pubspec.yaml'

- name: Upload Release
uses: softprops/action-gh-release@v2
with:
name: "${{ steps.yq.outputs.result }}"
token: ${{ secrets.TOKEN }}
files: |
dist/*/*.msix
dist/*/*.zip

- run: echo "🍏 Windows job's status is ${{ job.status }}."
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
*.swp
.DS_Store
.atom/
.build/
.buildlog/
.history
.svn/
.swiftpm/
migrate_working_dir/

# IntelliJ related
Expand Down
12 changes: 6 additions & 6 deletions .metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited.

version:
revision: "603104015dd692ea3403755b55d07813d5cf8965"
revision: "2663184aa79047d0a33a14a3b607954f8fdd8730"
channel: "stable"

project_type: app
Expand All @@ -13,11 +13,11 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: 603104015dd692ea3403755b55d07813d5cf8965
base_revision: 603104015dd692ea3403755b55d07813d5cf8965
- platform: windows
create_revision: 603104015dd692ea3403755b55d07813d5cf8965
base_revision: 603104015dd692ea3403755b55d07813d5cf8965
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
- platform: android
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730

# User provided section

Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx2G -Xms100m -Xlog:disable"
"java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx2G -Xms100m -Xlog:disable",
"idf.pythonInstallPath": "/opt/homebrew/bin/python3"
}
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,26 @@

![flutter-browser-article-logo](https://user-images.githubusercontent.com/5956938/86740154-b7a48180-c036-11ea-85c1-cbd662f65f84.png)

A Full-Featured Mobile Browser App (such as the Google Chrome mobile browser) created using Flutter and the features offered by the [flutter_inappwebview](https://github.com/pichillilorenzo/flutter_inappwebview) plugin.
A Full-Featured Mobile and Desktop Browser App (such as the Google Chrome mobile browser) created using Flutter and the features offered by the [flutter_inappwebview](https://github.com/pichillilorenzo/flutter_inappwebview) plugin.

It is available on the **Google Play Store** at [https://play.google.com/store/apps/details?id=com.pichillilorenzo.flutter_browser](https://play.google.com/store/apps/details?id=com.pichillilorenzo.flutter_browser)

For Desktop builds, check the [Releases](https://github.com/pichillilorenzo/flutter_browser_app/releases) page.

## Introduction
Article: [Creating a Full-Featured Browser using WebViews in Flutter](https://medium.com/flutter-community/creating-a-full-featured-browser-using-webviews-in-flutter-9c8f2923c574?source=friends_link&sk=55fc8267f351082aa9e73ced546f6bcb).
**Old article**: [Creating a Full-Featured Browser using WebViews in Flutter](https://medium.com/flutter-community/creating-a-full-featured-browser-using-webviews-in-flutter-9c8f2923c574?source=friends_link&sk=55fc8267f351082aa9e73ced546f6bcb).

Check out also the article that introduces the [flutter_inappwebview](https://github.com/pichillilorenzo/flutter_inappwebview) plugin here: [InAppWebView: The Real Power of WebViews in Flutter](https://medium.com/flutter-community/inappwebview-the-real-power-of-webviews-in-flutter-c6d52374209d?source=friends_link&sk=cb74487219bcd85e610a670ee0b447d0).
**OLD**: Check out also the article that introduces the [flutter_inappwebview](https://github.com/pichillilorenzo/flutter_inappwebview) plugin here: [InAppWebView: The Real Power of WebViews in Flutter](https://medium.com/flutter-community/inappwebview-the-real-power-of-webviews-in-flutter-c6d52374209d?source=friends_link&sk=cb74487219bcd85e610a670ee0b447d0).

## Features
- **Multi-Window Support on Desktop**;
- **WebView Tab**, with custom on long-press link/image preview, and how to move from one tab to another without losing the WebView state;
- **Browser App Bar** with the current URL and all popup menu actions such as opening a new tab, a new incognito tab, saving the current URL to the favorite list, saving a page to offline usage, viewing the SSL Certificate used by the website, enable Desktop Mode, etc. (features similar to the Google Chrome App);
- **Developer console**, where you can execute JavaScript code, see some network info, manage the browser storage such as cookies, window.localStorage, etc;
- **Settings page**, where you can update the browser general settings and enable/disable all the features offered by the flutter_inappwebview for each WebView Tab, such as enabling/disabling JavaScript, caching, scrollbars, setting custom user-agent, etc., and all the Android and iOS-specific features;
- **Save** and **restore** the current Browser state.

## Final Result
Video: [Flutter Browser App Final Result](https://drive.google.com/file/d/1wE2yUGwjNBiUy72GOjPIYyDXYQn3ewYn/view?usp=sharing).
### Final Result
**Old video**: [Flutter Browser App Final Result](https://drive.google.com/file/d/1wE2yUGwjNBiUy72GOjPIYyDXYQn3ewYn/view?usp=sharing).

If you found this useful and you like the [flutter_inappwebview](https://github.com/pichillilorenzo/flutter_inappwebview) plugin and this App project, give a star to these projects, thanks!
13 changes: 6 additions & 7 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
Expand Down Expand Up @@ -35,19 +36,18 @@ android {
ndkVersion flutter.ndkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = '1.8'
jvmTarget = '17'
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}


defaultConfig {
applicationId "com.pichillilorenzo.flutter_browser"
minSdkVersion 21
Expand Down Expand Up @@ -77,8 +77,7 @@ flutter {
}

dependencies {

implementation 'com.google.android.material:material:1.8.0-alpha01'
implementation 'com.google.android.material:material:1.12.0'

def multidex_version = "2.0.1"
implementation "androidx.multidex:multidex:$multidex_version"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.pichillilorenzo.flutter_news_browser_app

import io.flutter.embedding.android.FlutterActivity

class MainActivity: FlutterActivity()
12 changes: 11 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.2.1'
}
}

allprojects {
repositories {
google()
Expand All @@ -15,4 +25,4 @@ subprojects {

tasks.register("clean", Delete) {
delete rootProject.buildDir
}
}
5 changes: 3 additions & 2 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
# android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
android.bundle.enableUncompressedNativeLibs=false
android.bundle.enableUncompressedNativeLibs=false
kotlin.version=1.9.22
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
2 changes: 1 addition & 1 deletion ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
<string>12.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
platform :ios, '11.0'
platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
Loading