Skip to content

Instantly share code, notes, and snippets.

View md-weber's full-sized avatar
💙
Flutter

Max Weber md-weber

💙
Flutter
View GitHub Profile
name: CI
on:
pull_request:
branches:
- development
- master
jobs:
test:
// 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 {
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'person_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
PersonModel _$PersonModelFromJson(Map<String, dynamic> json) {
return PersonModel(
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.3
http: ^0.12.0+4
json_annotation: ^3.0.1
dev_dependencies:
flutter_test:
sdk: flutter
part 'person_model.g.dart';
@JsonSerializable()
class PersonModel {
NameModel name;
String phone;
String email;
PictureModel picture;
PersonModel({this.name, this.phone, this.email, this.picture});
import 'package:flutter/material.dart';
import 'package:flutter_scrum_cards/pages/myHomePage.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
class Person {
String name;
String phoneNumber;
String imageUrl;
Person({this.name, this.phoneNumber, this.imageUrl});
Person.fromJson(Map<String, dynamic> json)
: name =
'${json["name"]["title"]} ${json["name"]["first"]} ${json["name"]["last"]}',
void main() {
var primeFactors = PrimeFactors();
primeFactors.factors(8);
}
class PrimeFactors {
List<int> factors(int num) {
List<int> primeList = [];
int divisable = 2;
bool search = true;
@md-weber
md-weber / main.dart
Created March 20, 2020 15:09
Child Widget
// 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 {
@override
// 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 {
@override