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
//Use this for block default contextmenu on flutter web | |
if (kIsWeb && kReleaseMode) { | |
//contextmenu will work on debug mode only | |
html.document.body!.addEventListener('contextmenu', (event) => event.preventDefault()); | |
//to prevent onPaste over hold web app | |
//html.document.onPaste.listen((event)=>event.preventDefault()); | |
} | |
/// Chid widget will not be able to use shortcuts on flutter web |
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
//This method uses encrypt:^5.0.1 package to encrypt the url | |
//Key and IV should be same for both encryption and decryption | |
//https://pub.dev/packages/encrypt | |
import 'package:encrypt/encrypt.dart' as encrypt; | |
import 'package:flutter/material.dart'; | |
String enCryptURL(String url, {bool isrestoreRoute = false}) { | |
//final Uri uri = Uri.parse(enCryptURL(routeInformation.location ?? "")); | |
//return RouteInformation(location: enCryptURL(location, isrestoreRoute: true)); |