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 'package:flutter/material.dart'; | |
import 'package:flutter_facebook_login/flutter_facebook_login.dart'; | |
import 'package:http/http.dart' as http; | |
import 'dart:convert'; | |
import 'package:flutter_auth_buttons/flutter_auth_buttons.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatefulWidget { | |
@override |
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
async function checkForAdBlocker() { | |
let Blocked; | |
async function Request() { | |
try { | |
return fetch( | |
new Request( | |
"https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js", { | |
method: 'HEAD', | |
mode: 'no-cors' |
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
var Speaker = function () { | |
var synth | |
var utterance | |
var voices | |
this.init = function () { | |
// CHECK FOR SPEECHSYNTHESIS API | |
if (!(window.speechSynthesis)) { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 DrawScreen extends StatefulWidget { | |
@override | |
_DrawScreenState createState() => _DrawScreenState(); | |
} | |
class _DrawScreenState extends State<DrawScreen> { | |
final _points = List<Offset>(); | |
final _recognizer = Recognizer(); | |
List<Prediction> _prediction; | |
bool initialize = false; |
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 DrawingPainter extends CustomPainter { | |
final List<Offset> points; | |
DrawingPainter(this.points); | |
final Paint _paint = Paint() | |
..strokeCap = StrokeCap.round | |
..color = Colors.blue | |
..strokeWidth = Constants.strokeWidth; |
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
final _canvasCullRect = Rect.fromPoints( | |
Offset(0, 0), | |
Offset(Constants.imageSize, Constants.imageSize), | |
); | |
final _whitePaint = Paint() | |
..strokeCap = StrokeCap.round | |
..color = Colors.white | |
..strokeWidth = Constants.strokeWidth; |
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 Prediction { | |
final double confidence; | |
final int index; | |
final String label; | |
Prediction({this.confidence, this.index, this.label}); | |
factory Prediction.fromJson(Map<dynamic, dynamic> json) { | |
return Prediction( | |
confidence: json['confidence'], |
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 PredictionWidget extends StatelessWidget { | |
final List<Prediction> predictions; | |
const PredictionWidget({Key key, this.predictions}) : super(key: key); | |
Widget _numberWidget(int num, Prediction prediction) { | |
return Column( | |
children: <Widget>[ | |
Text( | |
'$num', |
OlderNewer