Skip to content

Instantly share code, notes, and snippets.

View angelhdzdev's full-sized avatar

AngelHdz angelhdzdev

View GitHub Profile
@angelhdzdev
angelhdzdev / main.dart
Last active April 15, 2021 04:38
Dart HTML Sprite, Sprite Animation and Timer Test
import 'dart:html';
import 'dart:async';
class Button extends Sprite {
Button() : super() {
el = document.createElement("button") as ButtonElement;
el.style.left = "0px";
el.style.top = "0px";
}
@angelhdzdev
angelhdzdev / main.dart
Last active April 14, 2021 06:17
Having fun with Timers, Dart, HTML, CSS (with Flex) on Dartpad
import "dart:async";
import "dart:core";
import "dart:html";
class TimerEvent {
final int currentCount;
TimerEvent(this.currentCount);
}
@angelhdzdev
angelhdzdev / main.dart
Last active April 14, 2021 06:17
Dart Timer Issue
import "dart:async";
class SimpleTimer {
bool looping = false;
final int delay;
int _to = 0;
int _currentCount = 0;
late Timer _timer;
final _controller = StreamController<int>();
import 'package:flutter/material.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/rendering.dart';
void main() {
runApp(App());
}
@angelhdzdev
angelhdzdev / main.dart
Last active July 17, 2020 23:06
Searching Users By Name/Email Demo
import 'package:flutter/material.dart';
import 'dart:async';
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Center(
@angelhdzdev
angelhdzdev / main.dart
Last active April 29, 2020 12:36
Loading Sound URLs And Playing Them
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
import 'dart:html';
import 'dart:convert';
import 'dart:async';
class Song {
@angelhdzdev
angelhdzdev / main.dart
Last active April 25, 2020 00:45
Bienvenida con un SnackBar
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@angelhdzdev
angelhdzdev / main.dart
Last active April 16, 2020 02:23
Flutter Sounds Demo
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
//IGNORAR ESTE CODIGO. IR A CODIGO DE EJEMPLO ABAJO.
class AudioPlayer {
bool isLocal = false;