Skip to content

Instantly share code, notes, and snippets.

@Ahmed-gubara
Ahmed-gubara / google_tile_layer_widget.dart
Last active May 29, 2024 04:19
use google_maps_flutter on flutter_map package
import 'package:flutter/material.dart';
import 'package:flutter_map/plugin_api.dart' show CustomPoint, FlutterMapState;
import 'package:google_maps_flutter/google_maps_flutter.dart';
export 'package:google_maps_flutter/google_maps_flutter.dart' show MapType;
class GoogleMapTileLayer extends StatefulWidget {
final MapType mapType;
final EdgeInsets padding;
final bool trafficEnabled;
final bool buildingsEnabled;
import 'dart:ffi' as ffi;
import 'package:ffi/ffi.dart';
///Displays a modal dialog box that contains a system icon, a set of buttons, and a brief application-specific message, such as status or error information. The message box returns an integer value that indicates which button the user clicked.
MessageBoxReturnValue showMessageBox(
{String title,
String content,
MessageBoxType messageBoxType = MessageBoxType.MB_OK}) {
final dylib = ffi.DynamicLibrary.open('user32.dll');
@Ahmed-gubara
Ahmed-gubara / generate_class_path.gradle
Last active August 30, 2019 20:53
generate classpath for android (with flutter) support in vscode
/**
* Load all local properties defined on local.properties files in all projects (root and sub projects).
* How to use:
* - add apply from: 'properties-reader.gradle' on the root project's build.gradle
* - get the values by calling project.localProperties.get("property name")
* - check property existence by calling project.localProperties.contains("property name")
*/
def LOCAL_PROPERTIES_FILENAME = "local.properties"