Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
336f5b9
:arrow_up: upgraded dependencies other than `go_router`
sarbagyastha Oct 20, 2022
5d2c31b
:arrow_up: upgraded dependencies
sarbagyastha Oct 21, 2022
c320dd4
:truck: moved things in places
sarbagyastha Oct 30, 2022
bb7753d
:sparkles: created `clean_framework_firestore`
sarbagyastha Oct 30, 2022
da74aec
:fire: removed `clean_framework_core`
sarbagyastha Oct 30, 2022
5f89450
:sparkles: created `clean_framework_graphql`
sarbagyastha Oct 30, 2022
fddfaea
:arrow_down: removed dependencies on graphql and firestore
sarbagyastha Oct 30, 2022
264963c
:rotating_light: made analyzer happy to some extent
sarbagyastha Oct 30, 2022
53aaef0
:sparkles: created `clean_framework_rest`
sarbagyastha Oct 30, 2022
5210ed7
:rotating_light: fixed error due to stronger lint
sarbagyastha Oct 30, 2022
fc31a11
:recycle: minor refactor
sarbagyastha Oct 30, 2022
3082503
:bug: fixed tests
sarbagyastha Oct 30, 2022
b89c331
:rotating_light: made analyzer happy
sarbagyastha Oct 30, 2022
6abf1a1
:rotating_light: made analyzer happy
sarbagyastha Oct 30, 2022
cb672f0
:rotating_light: made analyzer happy
sarbagyastha Oct 30, 2022
2d48d0f
:bug: fixed issue with analysis options
sarbagyastha Oct 30, 2022
df7318c
:wrench: configured melos
sarbagyastha Oct 30, 2022
65c403a
:truck: moved network logger to utilities
sarbagyastha Oct 30, 2022
7da9c39
:truck: moved test helpers to `clean_framework_test` package
sarbagyastha Oct 30, 2022
4052a50
:bug: fixed failing tests
sarbagyastha Oct 30, 2022
3a793e7
:fire: removed pubspec overrides from remote repo
sarbagyastha Oct 30, 2022
125d343
:recycle: removed print
sarbagyastha Oct 30, 2022
d0cb853
:art: updated deserializer to take any object as input
sarbagyastha Oct 30, 2022
6bf9943
:sparkles: added `Deserializer.map`
sarbagyastha Oct 31, 2022
f8bc522
:sparkles: added `deserialize` extension to Map<String, dynamic>
sarbagyastha Oct 31, 2022
0d9fdc8
:art: formatted
sarbagyastha Oct 31, 2022
b5905aa
chore(release): publish packages
sarbagyastha Oct 31, 2022
a4c172e
:bookmark: updated version for release
sarbagyastha Oct 31, 2022
3f38eb0
:green_heart: fixed coverage report generation
sarbagyastha Oct 31, 2022
5b53f62
:green_heart: verify pub score
sarbagyastha Oct 31, 2022
a9024ad
:truck: moved tests to routing to own package
sarbagyastha Oct 31, 2022
8009b0b
:green_heart: named ci steps
sarbagyastha Oct 31, 2022
21dbb62
:page_facing_up: updated license and symlinked it to all packages
sarbagyastha Oct 31, 2022
0799201
:page_facing_up: updated license and symlinked it to all packages
sarbagyastha Oct 31, 2022
b0ad9a6
:page_facing_up: updated license and symlinked it to all packages
sarbagyastha Oct 31, 2022
5fbee2a
:page_facing_up: updated license and symlinked it to all packages
sarbagyastha Oct 31, 2022
25b4727
:page_facing_up: updated license and readme
sarbagyastha Oct 31, 2022
28e4c54
:bookmark: prepare for stable release of v1.5.0
sarbagyastha Nov 1, 2022
e17adfc
:rotating_light: fixed usage of deprecated method from riverpod
sarbagyastha Nov 1, 2022
81709d6
:green_heart: commented pub score verification
sarbagyastha Nov 1, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
♻️ minor refactor
  • Loading branch information
sarbagyastha committed Oct 30, 2022
commit fc31a11d8b8b62f0598ac5fd0eb5aa78de80ff94
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class JsonFeatureProvider implements FeatureProvider {
}

if (!flagObject.containsKey('rules')) {
flagObject['rules'] = [];
flagObject['rules'] = <Map<String, dynamic>>[];
}

flags[flag.key] = flagObject;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
// ignore_for_file: avoid_print

import 'dart:convert';

import 'package:clean_framework/clean_framework.dart';
import 'package:flutter/foundation.dart';

int _lineWidth = 100;

abstract class NetworkLogger {
NetworkLogger() {
if (CleanFrameworkObserver.instance.enableNetworkLogs) {
if (kDebugMode && CleanFrameworkObserver.instance.enableNetworkLogs) {
initialize();
}
}
Expand All @@ -18,11 +21,11 @@ abstract class NetworkLogger {
}

String prettyMap(Map<String, dynamic> map) {
return JsonEncoder.withIndent(' ').convert(map);
return const JsonEncoder.withIndent(' ').convert(map);
}

void printInLines(String data) {
final lines = LineSplitter().convert(data);
final lines = const LineSplitter().convert(data);
for (final line in lines) {
print('║ $line');
}
Expand All @@ -31,7 +34,7 @@ abstract class NetworkLogger {

void printCategory(String data) {
final width = (_lineWidth - data.length - 5) ~/ 2;
final divider = '${'┄' * width}';
final divider = '┄' * width;
print('╟$divider $data $divider');
printGap();
}
Expand Down
6 changes: 3 additions & 3 deletions packages/clean_framework/lib/src/feature_state/feature.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import 'package:flutter/material.dart';
/// instances globally shared to simplify its use.
@immutable
class Feature extends Equatable {
final String name;
final String version;

const Feature({required this.name, String? version})
: version = version ?? '1.0';

final String name;
final String version;

@override
List<Object?> get props => [name, version];
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import 'package:clean_framework/src/feature_state/feature.dart';
import 'package:clean_framework/src/feature_state/feature_mapper.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

import 'feature.dart';

/// An instance of this class creates a [FeatureMapper] implementation
/// that uses a specific data type to represent the states of each
/// [Feature].
Expand Down