Skip to content

Instantly share code, notes, and snippets.

View neiljaywarner's full-sized avatar
💭
fluttering

Neil Jay Warner neiljaywarner

💭
fluttering
  • Carrollton, TX
View GitHub Profile
@neiljaywarner
neiljaywarner / main.dart
Created November 2, 2022 20:10
star wars crawl excpet rtl-slidetransistion example modified only with 2 lines or so
import 'package:flutter/material.dart';
// see https://api.flutter.dev/flutter/widgets/SlideTransition-class.html
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
static const String _title = 'Flutter Code Sample';
@override
@neiljaywarner
neiljaywarner / MainActivity.java
Created March 29, 2019 16:31
MainActivity.java for add2app scenario with 'custom' plugin internal to package and regular plugin
package com.example.fluttergetstringdriver;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.FrameLayout;
@neiljaywarner
neiljaywarner / main.dart
Created March 29, 2019 16:26
Platform call and device_info simple plugin usage
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:device_info/device_info.dart';
import 'package:flutter/services.dart';
void main() async {
DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
if (Platform.isAndroid) {
AndroidDeviceInfo androidInfo = await (deviceInfo.androidInfo);
@neiljaywarner
neiljaywarner / GetStringPlugin.java
Created March 29, 2019 16:11
Simple java file to separate and decouple Android platform call for Flutter a bit while still not having to publish at all.
package com.example.fluttergetstringdriver;
import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel;
import io.flutter.plugin.common.PluginRegistry;
public class GetStringPlugin implements MethodChannel.MethodCallHandler {
/** Plugin registration. */
public static void registerWith(PluginRegistry.Registrar registrar) {