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
// Copyright 2024 the Dart project authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style license | |
// that can be found in the LICENSE file. | |
import 'dart:async'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter_markdown/flutter_markdown.dart'; | |
import 'package:google_generative_ai/google_generative_ai.dart'; | |
import 'package:url_launcher/link.dart'; |
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
// Copyright 2024 the Dart project authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style license | |
// that can be found in the LICENSE file. | |
import 'dart:async'; | |
import 'dart:typed_data'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter_markdown/flutter_markdown.dart'; | |
import 'package:google_generative_ai/google_generative_ai.dart'; |
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
Future<Uint8List?> pickFile() async { | |
final el = html.document.createElement('input') as html.HTMLInputElement; | |
el.type = 'file'; | |
el.accept = 'image/*'; | |
el.click(); | |
final completer = Completer<Uri?>(); | |
el.onchange = (html.Event e) { | |
final files = el.files; | |
if (files != null && files.length != 0) { | |
final file = files.item(0); |
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:vector_math/vector_math_64.dart' hide Colors; | |
void main() { | |
final controller = WidgetCanvasController([ | |
WidgetCanvasChild( | |
key: UniqueKey(), | |
offset: Offset.zero, | |
size: const Size(400, 800), | |
child: Scaffold( |
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_markdown/flutter_markdown.dart'; | |
class ChatBubble extends StatelessWidget { | |
const ChatBubble({ | |
super.key, | |
this.child, | |
this.text, | |
required this.isUser, | |
}); |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<rss xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:rawvoice="http://www.rawvoice.com/rawvoiceRssModule/" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0"> | |
<channel> | |
<title>Creative Engineering</title> | |
<googleplay:author>Rody Davis, Norbert Kozsir</googleplay:author> | |
<rawvoice:rating>TV-G</rawvoice:rating> | |
<rawvoice:location>San Francisco, California</rawvoice:location> | |
<rawvoice:frequency>Weekly</rawvoice:frequency> | |
<author>Rody Davis, Norbert Kozsir</author> | |
<itunes:author>Rody Davis, Norbert Kozsir</itunes:author> |
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 'dart:io'; | |
import 'package:contacts_service/contacts_service.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:path_provider/path_provider.dart'; | |
import 'package:share_extend/share_extend.dart'; | |
/// Share a VCF Card from a Contact Object | |
void shareVCFCard(BuildContext context, {Contact contact}) async { | |
final Contact _info = contact; |
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:dart_mappable/dart_mappable.dart'; | |
part 'schema.mapper.dart'; | |
@MappableClass() | |
class JsonCanvas with JsonCanvasMappable { | |
List<JsonCanvasNode> nodes; | |
List<JsonCanvasEdge> edges; | |
JsonCanvas({ |
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
void main() { | |
final number = 1; | |
final str = 'Hello World'; | |
print((number, str)); | |
print((DateTime.now(), str)); | |
print((DateTime.now(), count: number, description: str)); |
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
void main() { | |
myFunction(1, 2, c: 3, d: 4); | |
myFunction(1, c: 3, d: 4, 2); | |
myFunction(c: 3, d: 4, 1, 2); | |
myFunction(c: 3, 1, 2, d: 4); | |
myFunction.call(1, 2, c: 3, d: 4); | |
Function.apply(myFunction, [1, 2], {#c: 3, #d: 4}); | |
} | |
void myFunction(int a, int b, {int? c, int? d}) { |
NewerOlder