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 'package:flutter/material.dart'; | |
| void main() => runApp(MyApp()); | |
| class MyApp extends StatelessWidget { | |
| // This widget is the root of your application. | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( | |
| title: 'Flutter Demo', |
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 'package:flutter/material.dart'; | |
| void main() => runApp(new MyApp()); | |
| class MyApp extends StatelessWidget { | |
| // This widget is the root of your application. | |
| @override | |
| Widget build(BuildContext context) { | |
| return new MaterialApp( | |
| title: 'Flutter Demo', |
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
| void loadMore() { | |
| setState(() { | |
| if((present + perPage )> originalItems.length) { | |
| items.addAll( | |
| originalItems.getRange(present, originalItems.length)); | |
| } else { | |
| items.addAll( | |
| originalItems.getRange(present, present + perPage)); | |
| } | |
| present = present + perPage; |
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
| NotificationListener<ScrollNotification>( | |
| onNotification: (ScrollNotification scrollInfo) { | |
| if (scrollInfo.metrics.pixels == | |
| scrollInfo.metrics.maxScrollExtent) { | |
| loadMore(); | |
| } | |
| }, | |
| child: ListView.builder( | |
| // ... | |
| ), |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <resources> | |
| <color name="turquoise">#1ABC9C</color> | |
| <color name="emerald">#2ECC71</color> | |
| <color name="peter_river">#3498DB</color> | |
| <color name="amethyst">#9B59B6</color> | |
| <color name="wet_asphalt">#34495E</color> | |
| <color name="green_sea">#16A085</color> | |
| <color name="nephritis">#27AE60</color> |
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 'package:flutter/material.dart'; | |
| import 'package:flutter_native_log/flutter_native_log.dart'; | |
| void main() => runApp(new MyApp()); | |
| class MyApp extends StatefulWidget { | |
| @override | |
| _MyAppState createState() => new _MyAppState(); | |
| } |
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 "FlutterNativeLogPlugin.h" | |
| @implementation FlutterNativeLogPlugin | |
| + (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar { | |
| FlutterMethodChannel* channel = [FlutterMethodChannel | |
| methodChannelWithName:@"flutter_native_log" | |
| binaryMessenger:[registrar messenger]]; | |
| FlutterNativeLogPlugin* instance = [[FlutterNativeLogPlugin alloc] init]; | |
| [registrar addMethodCallDelegate:instance channel:channel]; | |
| } |
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
| package io.github.ponnamkarthik.flutternativelog | |
| import io.flutter.plugin.common.MethodChannel | |
| import io.flutter.plugin.common.MethodChannel.MethodCallHandler | |
| import io.flutter.plugin.common.MethodChannel.Result | |
| import io.flutter.plugin.common.MethodCall | |
| import io.flutter.plugin.common.PluginRegistry.Registrar | |
| import android.util.Log |
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 'dart:async'; | |
| import 'package:flutter/services.dart'; | |
| import 'package:meta/meta.dart'; | |
| enum Log { | |
| DEBUG, | |
| WARNING, | |
| ERROR | |
| } |
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 'package:flutter/widgets.dart'; | |
| import 'package:flutter/material.dart'; | |
| import 'dart:convert'; | |
| /* | |
| * TextView with HTML tags support By Kyle Katarn for Dart | |
| * | |
| * Original code by Erik Arvidsson, Mozilla Public License | |
| * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js | |
| * and ported it on JavaScript by John Resig (ejohn.org) |