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
import io.flutter.embedding.android.FlutterActivity | |
import io.flutter.embedding.engine.FlutterEngine | |
import io.flutter.plugin.common.MethodChannel | |
class MyFlutterActivity : FlutterActivity() { | |
private val CHANNEL = "com.example.myflutterapp/data" | |
val token = "dummy123" | |
override fun getCachedEngineId(): String { |
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
class UserView extends StatefulWidget { | |
const UserView({Key? key}) : super(key: key); | |
@override | |
State<UserViewState> createState() => _UserViewState(); | |
} | |
class _UserViewState extends State<UserViewState> { | |
var _token = ""; | |
static const channelName = 'com.myflutterapp/data'; |
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
import UIKit | |
import Flutter | |
import FlutterPluginRegistrant | |
class ShowFlutterViewControler: UIViewController{ | |
let userToken = "dummy123" | |
func showFlutter(){ | |
let flutterEnggine = (UIApplication.shared.delegate as! AppDelegate).flutter_engine |
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
import UIKit | |
import Flutter | |
import FlutterPluginRegistrant | |
class ShowFlutterViewControler: UIViewController{ | |
func showFlutter(){ | |
let flutterEnggine = (UIApplication.shared.delegate as! AppDelegate).flutter_engine | |
let flutterController = FlutterViewController(engine:flutterEnggine,nibName:nil,bundle:nil) |
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
import FlutterPluginRegistrant | |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
lazy var flutter_engine = FlutterEngine(name: "flutter_engine") | |
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | |
flutter_engine.run() | |
GeneratedPluginRegistrant.register(with: self.flutter_engine) |
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
git clone https://github.com/letsencrypt/letsencrypt | |
cd letsencrypt | |
service nginx stop | |
./letsencrypt-auto certonly -d www.yourdomain.com | |
cert file location | |
/etc/letsencrypt/live/www.yourdomain.com/ | |
cat fullchain.pem > server.crt | |
cat privkey.pem > server.key |
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
public interface OnMukaUpdateListener { | |
public void onMukaUpdate(String text); | |
} |
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
#!/bin/sh | |
sudo fallocate -l 1G /swapfile | |
chmod 600 /swapfile | |
mkswap /swapfile | |
swapon /swapfile | |
echo "/swapfile none swap sw 0 0" >> /etc/fstab | |
sysctl -w vm.swappiness=30 | |
free | |