Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Owner account null #427 #443

Merged
merged 5 commits into from
Oct 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
30 changes: 30 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
constant_identifier_names: false # TODO: use lowerCamelCases consistently
avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
package com.builttoroam.devicecalendar.models

class Calendar(
val id: String,
val name: String,
val color: Int,
val accountName: String,
val accountType: String,
val ownerAccount: String
) {
class Calendar(val id: String, val name: String, val color : Int, val accountName: String, val accountType: String, val ownerAccount: String?) {
var isReadOnly: Boolean = false
var isDefault: Boolean = false
}
33 changes: 30 additions & 3 deletions example/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
include: package:pedantic/analysis_options.yaml
#include: package:flutter_lints/flutter.yaml
# TODO: change to flutter lints (https://pub.dev/packages/flutter_lints)
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
constant_identifier_names: false # TODO: use lowerCamelCases consistently
avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
2 changes: 1 addition & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 31
compileSdkVersion 32
ndkVersion '22.1.7171670'

sourceSets {
Expand Down
2 changes: 1 addition & 1 deletion example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.0.3'
classpath 'com.android.tools.build:gradle:7.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down
4 changes: 2 additions & 2 deletions example/integration_test/app_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'package:device_calendar_example/main.dart' as app;
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group('Calendar plugin example', () {
final eventTitle = Uuid().v1();
final eventTitle = const Uuid().v1();
final saveEventButtonFinder = find.byKey(const Key('saveEventButton'));
final eventTitleFinder = find.text(eventTitle);
final firstWritableCalendarFinder =
Expand All @@ -27,7 +27,7 @@ void main() {
testWidgets('select first writable calendar', (WidgetTester tester) async {
app.main();

await tester.pumpAndSettle(Duration(milliseconds: 500));
await tester.pumpAndSettle(const Duration(milliseconds: 500));
expect(firstWritableCalendarFinder, findsOneWidget);
});
testWidgets('go to add event page', (WidgetTester tester) async {
Expand Down
2 changes: 1 addition & 1 deletion example/integration_test/integration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:integration_test/integration_test_driver.dart';

/// Instruction for iOS:
/// See `ios.sh`
/// Instruction for android:
/// Instruction for android:
/// See `integration_test_android.dart`

Future<void> main() => integrationDriver();
2 changes: 1 addition & 1 deletion example/lib/common/app_routes.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class AppRoutes {
static final calendars = '/';
static const calendars = '/';
}
11 changes: 8 additions & 3 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,25 @@ import 'package:flutter/material.dart';
import 'common/app_routes.dart';
import 'presentation/pages/calendars.dart';

void main() => runApp(MyApp());
void main() => runApp(const MyApp());

class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);

@override
_MyAppState createState() => _MyAppState();
State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(),
themeMode: ThemeMode.system,
darkTheme: ThemeData.dark(),
routes: {
AppRoutes.calendars: (context) {
return CalendarsPage(key: Key('calendarsPage'));
return const CalendarsPage(key: Key('calendarsPage'));
}
},
);
Expand Down
4 changes: 2 additions & 2 deletions example/lib/presentation/date_time_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class DateTimePicker extends StatelessWidget {
final ValueChanged<TimeOfDay>? selectTime;
final bool enableTime;

Future<Null> _selectDate(BuildContext context) async {
Future<void> _selectDate(BuildContext context) async {
final picked = await showDatePicker(
context: context,
initialDate: selectedDate != null
Expand All @@ -36,7 +36,7 @@ class DateTimePicker extends StatelessWidget {
}
}

Future<Null> _selectTime(BuildContext context) async {
Future<void> _selectTime(BuildContext context) async {
if (selectedTime == null) return;
final picked =
await showTimePicker(context: context, initialTime: selectedTime!);
Expand Down
Loading