View main.dart
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
return MaterialApp( | |
onGenerateRoute: (settings) { | |
if (settings.name == '/information') { | |
return PageRouteBuilder( | |
pageBuilder: (context, animation1, animation2) => InformationScreen(), | |
transitionDuration: Duration(seconds: 0), | |
); | |
} else if (settings.name == '/privacy') { | |
return PageRouteBuilder( | |
pageBuilder: (context, animation1, animation2) => PrivacySettings(), |
View qr_code_reader.dart
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
class SomeStatefulWidget extends StatefulWidget { | |
@override | |
_SomeStatefulWidgetState createState() => _SomeStatefulWidgetState(); | |
} | |
class _SomeStatefulWidgetState extends State<SomeStatefulWidget> { | |
static const platform = const MethodChannel('your.app.identifier/qrcode'); | |
final PermissionsManager _permissionsManager = PermissionsManager(); | |
bool _iOSDidSendQRCode = false; |
View information_fragment.xml
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
<?xml version="1.0" encoding="utf-8"?> | |
<layout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_marginTop="?attr/actionBarSize"> | |
<androidx.constraintlayout.widget.ConstraintLayout | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> |
View FragmentExtension.kt
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
package <your.package.name> | |
import androidx.fragment.app.Fragment | |
import io.flutter.embedding.android.FlutterFragment | |
import io.flutter.embedding.engine.FlutterEngine | |
// フラターフラグメントを作成する時にこの関数を使用します。 | |
fun Fragment.createFlutterFragment(flutterFragmentTag: String, flutterCachedEngineId: String, containerId: Int): FlutterFragment { | |
var flutterFragment = childFragmentManager.findFragmentByTag(flutterFragmentTag) as FlutterFragment? |
View UIViewController+Flutter.swift
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
import UIKit | |
import Flutter | |
extension UIViewController { | |
// 全てのUIViewControllerでフラターを内包できるように関数を定義します。 | |
private func createFlutterViewController() -> FlutterViewController? { | |
if let flutterEngine = (UIApplication.shared.delegate as? AppDelegate)?.informationTabFlutterEngine { | |
let flutterViewController = FlutterViewController(engine: flutterEngine, nibName: nil, bundle: nil) |