-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
df099cc
commit 9d5e62f
Showing
6 changed files
with
1,141 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# FlutterFlow Windows | ||
|
||
![FlutterFlow Windows Logo](https://i.ibb.co/hf9HvM2/Flutter-flow.png) | ||
|
||
**FlutterFlow Windows** is an Electron-based application that allows you to use FlutterFlow on the Windows operating system. | ||
|
||
## Descrição | ||
|
||
FlutterFlow is an app development platform that lacks a native client for Windows. This project utilizes ElectronJS to create a desktop client for FlutterFlow, making it easier for Windows users to access this platform. | ||
|
||
## Distribution: | ||
- Win 32/64 Installer: [Click here](https://github.com/eduhcastro/flutterflow-windows/releases) | ||
|
||
## How to Use | ||
|
||
### Prerequisites | ||
|
||
- Make sure you have Node.js installed on your system. You can download it from [nodejs.org](https://nodejs.org/). | ||
|
||
### Installation | ||
|
||
1. Clone this repository: | ||
|
||
```shell | ||
git clone https://github.com/eduhcastro/flutterflow-windows.git | ||
2. Navigate to the project directory: | ||
|
||
```shell | ||
cd flutterflow-windows | ||
3. Install the dependencies: | ||
```shell | ||
npm install | ||
|
||
### Contributing | ||
|
||
You are welcome to contribute to this project. If you encounter issues or have suggestions for improvement, feel free to open an issue or submit a pull request. | ||
|
||
|
||
## Author | ||
|
||
Eduardo Castro | ||
|
||
|
||
## License | ||
|
||
This project is licensed under the MIT License - see the LICENSE file for more details. | ||
|
||
<b>Note:</b> This project is not affiliated with FlutterFlow. It is an independent initiative to bring the platform to Windows users. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
const { app, BrowserWindow, ipcMain } = require('electron'); | ||
const path = require('path'); | ||
|
||
// Flag to track if it's the first window load | ||
let firstLoad = true; | ||
let mainWindow; | ||
|
||
// Function to create and configure the main window | ||
function createMainWindow() { | ||
mainWindow = new BrowserWindow({ | ||
width: 1280, | ||
height: 720, | ||
frame: false, // Remove window frame | ||
show: true, | ||
backgroundColor: '#202124', | ||
webPreferences: { | ||
nodeIntegration: true, // Allow Node.js integration | ||
webviewTag: true, | ||
plugins: true, | ||
additionalArguments: ['filePath'], | ||
preload: path.join(__dirname, 'preload.js'), // Path to preload script | ||
} | ||
}); | ||
|
||
mainWindow.loadURL('https://app.flutterflow.io/'); | ||
} | ||
|
||
// Event handler for when Electron is ready | ||
app.on("ready", () => { | ||
createMainWindow(); | ||
}); | ||
|
||
// Event handler for when a new browser window is created | ||
app.on("browser-window-created", function (event, window) { | ||
// Configure new windows | ||
if (!firstLoad) { | ||
window.setMenu(null); // Remove the menu | ||
window.removeMenu(); | ||
window.setMenuBarVisibility(false); | ||
window.menuBarVisible = false; | ||
window.autoHideMenuBar = true; | ||
window.flashFrame(false); | ||
|
||
window.webContents.on('dom-ready', () => { | ||
// Handle new windows, such as setting custom headers | ||
// You might want to set the preload for all new windows here. | ||
}); | ||
} | ||
firstLoad = false; | ||
}); | ||
|
||
// Event handlers for window control | ||
ipcMain.on('move-window', (event, deltaX, deltaY) => { | ||
const currentWindow = BrowserWindow.getFocusedWindow(); | ||
if (currentWindow) { | ||
const { x, y } = currentWindow.getBounds(); | ||
const newX = x + deltaX; | ||
const newY = y + deltaY; | ||
currentWindow.setPosition(newX, newY); | ||
} | ||
}); | ||
|
||
ipcMain.on('close-window', () => { | ||
if (mainWindow) { | ||
mainWindow.close(); | ||
} | ||
}); | ||
|
||
|
||
ipcMain.on('minimize-window', () => { | ||
if (mainWindow) { | ||
mainWindow.minimize(); | ||
} | ||
}); | ||
|
||
ipcMain.on('maximize-window', () => { | ||
if (mainWindow) { | ||
if (mainWindow.isMaximized()) { | ||
mainWindow.unmaximize(); | ||
} else { | ||
mainWindow.maximize(); | ||
} | ||
} | ||
}); |
Oops, something went wrong.