mirror of
https://github.com/flutter/samples.git
synced 2026-04-26 17:38:21 +00:00
[linting_tool] Implement saving rules to DB (#860)
This commit is contained in:
committed by
GitHub
parent
1818925286
commit
bbb8e342f1
26
experimental/linting_tool/lib/model/profile.dart
Normal file
26
experimental/linting_tool/lib/model/profile.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
// Copyright 2021 The Flutter team. 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:equatable/equatable.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:linting_tool/model/rule.dart';
|
||||
|
||||
part 'profile.g.dart';
|
||||
|
||||
@HiveType(typeId: 1)
|
||||
class RulesProfile extends Equatable {
|
||||
@HiveField(0)
|
||||
final String name;
|
||||
|
||||
@HiveField(1)
|
||||
final List<Rule> rules;
|
||||
|
||||
const RulesProfile({
|
||||
required this.name,
|
||||
required this.rules,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [name];
|
||||
}
|
||||
Reference in New Issue
Block a user