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:convert'; | |
void main() { | |
var jsonSource = """ | |
{ | |
"Events": [ | |
{ | |
"id": 1, | |
"event_name": "Cake tasting", | |
"event_photo": "https://dispensaries.s3.amazonaws.com/event_photo/Southern_Cali_Kush_3.jpg", |
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:ffi'; | |
// long fibonacci(int n) | |
typedef NativeFibonacci = Int64 Function(Int64 n); | |
typedef DartFibonacci = int Function(int n); | |
class Fibonacci { | |
static final dll = DynamicLibrary.open('fibonacci.dll'); | |
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
long long fibonacci(long long n) { | |
if (n <= 1) return 1; | |
return fibonacci(n - 1) + fibonacci(n - 2); | |
} |
NewerOlder