Skip to content

Instantly share code, notes, and snippets.

View davidmigloz's full-sized avatar

David Miguel Lozano davidmigloz

View GitHub Profile
@davidmigloz
davidmigloz / main.dart
Created November 14, 2024 21:14
Generated code from pixels2flutter.dev
import 'package:flutter/material.dart';
void main() {
runApp(const ChatApp());
}
class ChatApp extends StatelessWidget {
const ChatApp({super.key});
@override
@davidmigloz
davidmigloz / main.dart
Created July 4, 2024 21:07
Generated code from pixels2flutter.dev
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@davidmigloz
davidmigloz / streaming.dart
Last active January 4, 2024 23:29
LangChain.dart streaming
import 'dart:io';
import 'package:langchain/langchain.dart';
import 'package:langchain_openai/langchain_openai.dart';
import 'package:langchain_ollama/langchain_ollama.dart';
Future<void> option1() async {
final openaiApiKey = Platform.environment['OPENAI_API_KEY'];
final chatModel = ChatOpenAI(apiKey: openaiApiKey);
@davidmigloz
davidmigloz / main.dart
Created December 15, 2023 21:57
Generated code from pixels2flutter.dev
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@davidmigloz
davidmigloz / main.dart
Created December 8, 2023 15:11
Generated code from pixels2flutter.dev
import 'package:flutter/material.dart';
void main() {
runApp(BezierCurveTesterApp());
}
class BezierCurveTesterApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@davidmigloz
davidmigloz / main.dart
Created December 5, 2023 23:04
Generated code from pixels2flutter.dev
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@davidmigloz
davidmigloz / main.dart
Created December 5, 2023 17:44
Generated code from pixels2flutter.dev
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
void main() {
runApp(CalculatorApp());
}
class CalculatorApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@davidmigloz
davidmigloz / main.dart
Created December 4, 2023 08:05
Generated code from pixels2flutter.dev
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@davidmigloz
davidmigloz / main.dart
Created December 3, 2023 22:21
Generated code from pixels2flutter.dev
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@davidmigloz
davidmigloz / main.dart
Created December 1, 2023 22:08
Generated code from pixels2flutter.dev
import 'dart:math';
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
void main() {
runApp(PongGame());
}
class PongGame extends StatelessWidget {