-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1838 from instructure/release/teacher-1.22.0-55
Release Teacher 1.22.0 (55)
- Loading branch information
Showing
186 changed files
with
3,730 additions
and
1,693 deletions.
There are no files selected for viewing
This file contains 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
Submodule android-vault
updated
from 89d680 to ddd561
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright (C) 2023 - present Instructure, Inc. | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, version 3 of the License. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
import 'package:built_value/built_value.dart'; | ||
import 'package:built_value/serializer.dart'; | ||
|
||
part 'feature_flags.g.dart'; | ||
|
||
abstract class FeatureFlags implements Built<FeatureFlags, FeatureFlagsBuilder> { | ||
|
||
@BuiltValueSerializer(serializeNulls: true) // Add this line to get nulls to serialize when we convert to JSON | ||
static Serializer<FeatureFlags> get serializer => _$featureFlagsSerializer; | ||
|
||
@BuiltValueField(wireName: 'send_usage_metrics') | ||
bool get sendUsageMetrics; | ||
|
||
FeatureFlags._(); | ||
factory FeatureFlags([void Function(FeatureFlagsBuilder) updates]) = _$FeatureFlags; | ||
|
||
static void _initializeBuilder(FeatureFlagsBuilder b) => b..sendUsageMetrics = false; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (C) 2023 - present Instructure, Inc. | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, version 3 of the License. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
import 'package:flutter_parent/models/feature_flags.dart'; | ||
import 'package:flutter_parent/network/utils/dio_config.dart'; | ||
import 'package:flutter_parent/network/utils/fetch.dart'; | ||
|
||
class FeaturesApi { | ||
|
||
Future<FeatureFlags> getFeatureFlags() { | ||
var dio = canvasDio(forceRefresh: true); | ||
|
||
return fetch(dio.get('/features/environment')); | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright (C) 2023 - present Instructure, Inc. | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, version 3 of the License. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
import 'dart:convert'; | ||
|
||
import 'package:dio/dio.dart'; | ||
import 'package:encrypt/encrypt.dart' as encrypt; | ||
import 'package:flutter_parent/network/utils/api_prefs.dart'; | ||
import 'package:flutter_parent/network/utils/dio_config.dart'; | ||
import 'package:flutter_parent/network/utils/fetch.dart'; | ||
import 'package:flutter_parent/network/utils/private_consts.dart'; | ||
|
||
class HeapApi { | ||
Future<Response> track(String event, {Map<String, dynamic> extras = const {}}) { | ||
final heapDio = DioConfig.heap(); | ||
final userId = ApiPrefs.getCurrentLogin().user.id; | ||
|
||
final encrypter = encrypt.Encrypter(encrypt.AES(encrypt.Key.fromUtf8(ENCRYPT_KEY))); | ||
final encryptedId = encrypter.encrypt(userId, iv: encrypt.IV.fromUtf8(ENCRYPT_IV)).base64; | ||
|
||
var data = { | ||
'app_id' : HEAP_PRODUCTION_ID, | ||
'identity' : encryptedId, | ||
'event' : event | ||
}; | ||
|
||
if (extras.isNotEmpty) { | ||
data['properties'] = json.encode(extras); | ||
} | ||
|
||
return fetch(heapDio.dio.post('/track', data: data)); | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.