<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Scrollable List</title>
<style>
body {
- Create
open_link_example.c
#include <gtk/gtk.h>
#include <stdlib.h>
void open_link(GtkButton *button, gpointer user_data) {
const gchar *url = "https://example.com";
GError *error = NULL;
This file contains hidden or 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
// Copyright 2019 the Dart project 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 'package:flutter/material.dart'; | |
import 'package:web/web.dart'; | |
void main() => runApp(const MyApp()); |
- Create
gtk_text_example.c
file:
#include <gtk/gtk.h>
// Callback function to handle the "destroy" signal
void on_destroy(GtkWidget *widget, gpointer data) {
gtk_main_quit();
}
- Make sure you installed VS Code here: https://code.visualstudio.com/
- Open VS Code, find WSL from Extensions and install it
- Click on
Open a remote windows
:
- Click on
Connect to WSL using Distro..
. By default, there is only Ubuntu (wsl1), you can use it if you want. But if you want to use WSL2, need to install another distro
4.1. List all available distros:
- Create
directory_picker.c
file:
#include <gtk/gtk.h>
// Callback function for the "Open" button
void open_button_clicked(GtkWidget *widget, gpointer data) {
GtkWidget *dialog;
const gchar *selected_folder;
System directories
Method | Result |
---|---|
Environment.getDataDirectory() | /data |
Environment.getDownloadCacheDirectory() | /cache |
Environment.getRootDirectory() | /system |
External storage directories
- Official document: https://docs.flutter.dev/development/add-to-app/ios/project-setup#option-a---embed-with-cocoapods-and-the-flutter-sdk
- Code implementation: https://docs.flutter.dev/add-to-app/ios/add-flutter-screen?tab=engine-uikit-swift-tab
- Complete official sample code: https://github.com/flutter/samples/tree/main/add_to_app/books
1. From the terminal, go to your current iOS native project, for eg: /Users/.../reproduce_issue_ios_native_addtoapp_optionA/
2. Group all current files/directories into a new directory (named MyApp
for eg)
- Add test package to
pubspec.yaml
- Old:
flutter_driver:
sdk: flutter
- New:
Official document: https://docs.flutter.dev/development/add-to-app/ios/project-setup
1. From the terminal, go to your current iOS native project, for eg: /Users/.../ios_native_addtoapp/
2. Create flutter module and go to module directory
flutter create --template module my_flutter
cd my_flutter