diff --git a/lib/famedlysdk.dart b/lib/famedlysdk.dart
index 223bb01..9930422 100644
--- a/lib/famedlysdk.dart
+++ b/lib/famedlysdk.dart
@@ -23,21 +23,21 @@
library famedlysdk;
-export 'package:famedlysdk/src/sync/RoomUpdate.dart';
-export 'package:famedlysdk/src/sync/EventUpdate.dart';
-export 'package:famedlysdk/src/sync/UserUpdate.dart';
-export 'package:famedlysdk/src/utils/MatrixException.dart';
-export 'package:famedlysdk/src/utils/MatrixFile.dart';
-export 'package:famedlysdk/src/utils/MxContent.dart';
-export 'package:famedlysdk/src/utils/Profile.dart';
-export 'package:famedlysdk/src/utils/PushRules.dart';
-export 'package:famedlysdk/src/utils/StatesMap.dart';
-export 'package:famedlysdk/src/AccountData.dart';
-export 'package:famedlysdk/src/Client.dart';
-export 'package:famedlysdk/src/Event.dart';
-export 'package:famedlysdk/src/Presence.dart';
-export 'package:famedlysdk/src/Room.dart';
-export 'package:famedlysdk/src/RoomAccountData.dart';
-export 'package:famedlysdk/src/StoreAPI.dart';
-export 'package:famedlysdk/src/Timeline.dart';
-export 'package:famedlysdk/src/User.dart';
+export 'package:famedlysdk/src/sync/room_update.dart';
+export 'package:famedlysdk/src/sync/event_update.dart';
+export 'package:famedlysdk/src/sync/user_update.dart';
+export 'package:famedlysdk/src/utils/matrix_exception.dart';
+export 'package:famedlysdk/src/utils/matrix_file.dart';
+export 'package:famedlysdk/src/utils/mx_content.dart';
+export 'package:famedlysdk/src/utils/profile.dart';
+export 'package:famedlysdk/src/utils/push_rules.dart';
+export 'package:famedlysdk/src/utils/states_map.dart';
+export 'package:famedlysdk/src/account_data.dart';
+export 'package:famedlysdk/src/client.dart';
+export 'package:famedlysdk/src/event.dart';
+export 'package:famedlysdk/src/presence.dart';
+export 'package:famedlysdk/src/room.dart';
+export 'package:famedlysdk/src/room_account_data.dart';
+export 'package:famedlysdk/src/store_api.dart';
+export 'package:famedlysdk/src/timeline.dart';
+export 'package:famedlysdk/src/user.dart';
diff --git a/lib/src/AccountData.dart b/lib/src/account_data.dart
similarity index 100%
rename from lib/src/AccountData.dart
rename to lib/src/account_data.dart
diff --git a/lib/src/Client.dart b/lib/src/client.dart
similarity index 98%
rename from lib/src/Client.dart
rename to lib/src/client.dart
index 9abeb75..221b1e3 100644
--- a/lib/src/Client.dart
+++ b/lib/src/client.dart
@@ -25,24 +25,24 @@ import 'dart:async';
import 'dart:core';
import 'package:famedlysdk/famedlysdk.dart';
-import 'package:famedlysdk/src/AccountData.dart';
-import 'package:famedlysdk/src/Presence.dart';
-import 'package:famedlysdk/src/StoreAPI.dart';
-import 'package:famedlysdk/src/sync/UserUpdate.dart';
-import 'package:famedlysdk/src/utils/MatrixFile.dart';
+import 'package:famedlysdk/src/account_data.dart';
+import 'package:famedlysdk/src/presence.dart';
+import 'package:famedlysdk/src/store_api.dart';
+import 'package:famedlysdk/src/sync/user_update.dart';
+import 'package:famedlysdk/src/utils/matrix_file.dart';
import 'package:pedantic/pedantic.dart';
-import 'Room.dart';
-import 'Event.dart';
-import 'User.dart';
-import 'utils/Profile.dart';
+import 'room.dart';
+import 'event.dart';
+import 'user.dart';
+import 'utils/profile.dart';
import 'dart:convert';
-import 'package:famedlysdk/src/Room.dart';
+import 'package:famedlysdk/src/room.dart';
import 'package:http/http.dart' as http;
import 'package:mime_type/mime_type.dart';
-import 'sync/EventUpdate.dart';
-import 'sync/RoomUpdate.dart';
-import 'sync/UserUpdate.dart';
-import 'utils/MatrixException.dart';
+import 'sync/event_update.dart';
+import 'sync/room_update.dart';
+import 'sync/user_update.dart';
+import 'utils/matrix_exception.dart';
typedef RoomSorter = int Function(Room a, Room b);
@@ -705,9 +705,7 @@ class Client {
} else {
await handleSync(syncResp);
}
- if (this.prevBatch == null) {
- this.onFirstSync.add(true);
- }
+ if (this.prevBatch == null) this.onFirstSync.add(true);
this.prevBatch = syncResp["next_batch"];
if (hash == _syncRequest.hashCode) unawaited(_sync());
} on MatrixException catch (exception) {
diff --git a/lib/src/Event.dart b/lib/src/event.dart
similarity index 99%
rename from lib/src/Event.dart
rename to lib/src/event.dart
index d96dd1c..d9b9b59 100644
--- a/lib/src/Event.dart
+++ b/lib/src/event.dart
@@ -23,8 +23,8 @@
import 'dart:convert';
import 'package:famedlysdk/famedlysdk.dart';
-import 'package:famedlysdk/src/utils/Receipt.dart';
-import './Room.dart';
+import 'package:famedlysdk/src/utils/receipt.dart';
+import './room.dart';
/// All data exchanged over Matrix is expressed as an "event". Typically each client action (e.g. sending a message) correlates with exactly one event.
class Event {
diff --git a/lib/src/Presence.dart b/lib/src/presence.dart
similarity index 100%
rename from lib/src/Presence.dart
rename to lib/src/presence.dart
diff --git a/lib/src/Room.dart b/lib/src/room.dart
similarity index 98%
rename from lib/src/Room.dart
rename to lib/src/room.dart
index 54b04e1..6b191e4 100644
--- a/lib/src/Room.dart
+++ b/lib/src/room.dart
@@ -23,19 +23,19 @@
import 'dart:async';
-import 'package:famedlysdk/src/Client.dart';
-import 'package:famedlysdk/src/Event.dart';
-import 'package:famedlysdk/src/RoomAccountData.dart';
-import 'package:famedlysdk/src/sync/EventUpdate.dart';
-import 'package:famedlysdk/src/sync/RoomUpdate.dart';
-import 'package:famedlysdk/src/utils/MatrixException.dart';
-import 'package:famedlysdk/src/utils/MatrixFile.dart';
-import 'package:famedlysdk/src/utils/MxContent.dart';
+import 'package:famedlysdk/src/client.dart';
+import 'package:famedlysdk/src/event.dart';
+import 'package:famedlysdk/src/room_account_data.dart';
+import 'package:famedlysdk/src/sync/event_update.dart';
+import 'package:famedlysdk/src/sync/room_update.dart';
+import 'package:famedlysdk/src/utils/matrix_exception.dart';
+import 'package:famedlysdk/src/utils/matrix_file.dart';
+import 'package:famedlysdk/src/utils/mx_content.dart';
import 'package:mime_type/mime_type.dart';
-import './User.dart';
-import 'Timeline.dart';
-import 'utils/StatesMap.dart';
+import './user.dart';
+import 'timeline.dart';
+import 'utils/states_map.dart';
/// Represents a Matrix room.
class Room {
diff --git a/lib/src/RoomAccountData.dart b/lib/src/room_account_data.dart
similarity index 94%
rename from lib/src/RoomAccountData.dart
rename to lib/src/room_account_data.dart
index 932ae67..69402d0 100644
--- a/lib/src/RoomAccountData.dart
+++ b/lib/src/room_account_data.dart
@@ -22,8 +22,8 @@
*/
import 'package:famedlysdk/famedlysdk.dart';
-import 'package:famedlysdk/src/AccountData.dart';
-import 'package:famedlysdk/src/Event.dart';
+import 'package:famedlysdk/src/account_data.dart';
+import 'package:famedlysdk/src/event.dart';
/// Stripped down events for account data and ephemrals of a room.
class RoomAccountData extends AccountData {
diff --git a/lib/src/StoreAPI.dart b/lib/src/store_api.dart
similarity index 92%
rename from lib/src/StoreAPI.dart
rename to lib/src/store_api.dart
index 24800ab..bd55f0f 100644
--- a/lib/src/StoreAPI.dart
+++ b/lib/src/store_api.dart
@@ -23,15 +23,15 @@
import 'dart:async';
import 'dart:core';
-import 'package:famedlysdk/src/AccountData.dart';
-import 'package:famedlysdk/src/Presence.dart';
-import 'Client.dart';
-import 'Event.dart';
-import 'Room.dart';
-import 'User.dart';
-import 'sync/EventUpdate.dart';
-import 'sync/RoomUpdate.dart';
-import 'sync/UserUpdate.dart';
+import 'package:famedlysdk/src/account_data.dart';
+import 'package:famedlysdk/src/presence.dart';
+import 'client.dart';
+import 'event.dart';
+import 'room.dart';
+import 'user.dart';
+import 'sync/event_update.dart';
+import 'sync/room_update.dart';
+import 'sync/user_update.dart';
/// Responsible to store all data persistent and to query objects from the
/// database.
diff --git a/lib/src/sync/EventUpdate.dart b/lib/src/sync/event_update.dart
similarity index 100%
rename from lib/src/sync/EventUpdate.dart
rename to lib/src/sync/event_update.dart
diff --git a/lib/src/sync/RoomUpdate.dart b/lib/src/sync/room_update.dart
similarity index 98%
rename from lib/src/sync/RoomUpdate.dart
rename to lib/src/sync/room_update.dart
index ba8efdd..69a65cb 100644
--- a/lib/src/sync/RoomUpdate.dart
+++ b/lib/src/sync/room_update.dart
@@ -21,7 +21,7 @@
* along with famedlysdk. If not, see .
*/
-import '../User.dart';
+import '../user.dart';
/// Represents a new room or an update for an
/// already known room.
diff --git a/lib/src/sync/UserUpdate.dart b/lib/src/sync/user_update.dart
similarity index 100%
rename from lib/src/sync/UserUpdate.dart
rename to lib/src/sync/user_update.dart
diff --git a/lib/src/Timeline.dart b/lib/src/timeline.dart
similarity index 98%
rename from lib/src/Timeline.dart
rename to lib/src/timeline.dart
index 0f1be89..4990b35 100644
--- a/lib/src/Timeline.dart
+++ b/lib/src/timeline.dart
@@ -23,10 +23,10 @@
import 'dart:async';
-import 'Event.dart';
-import 'Room.dart';
-import 'User.dart';
-import 'sync/EventUpdate.dart';
+import 'event.dart';
+import 'room.dart';
+import 'user.dart';
+import 'sync/event_update.dart';
typedef onTimelineUpdateCallback = void Function();
typedef onTimelineInsertCallback = void Function(int insertID);
diff --git a/lib/src/User.dart b/lib/src/user.dart
similarity index 97%
rename from lib/src/User.dart
rename to lib/src/user.dart
index e6f740f..7bcb215 100644
--- a/lib/src/User.dart
+++ b/lib/src/user.dart
@@ -22,9 +22,9 @@
*/
import 'package:famedlysdk/famedlysdk.dart';
-import 'package:famedlysdk/src/Room.dart';
-import 'package:famedlysdk/src/Event.dart';
-import 'package:famedlysdk/src/utils/MxContent.dart';
+import 'package:famedlysdk/src/room.dart';
+import 'package:famedlysdk/src/event.dart';
+import 'package:famedlysdk/src/utils/mx_content.dart';
enum Membership { join, invite, leave, ban }
diff --git a/lib/src/utils/MatrixException.dart b/lib/src/utils/matrix_exception.dart
similarity index 100%
rename from lib/src/utils/MatrixException.dart
rename to lib/src/utils/matrix_exception.dart
diff --git a/lib/src/utils/MatrixFile.dart b/lib/src/utils/matrix_file.dart
similarity index 100%
rename from lib/src/utils/MatrixFile.dart
rename to lib/src/utils/matrix_file.dart
diff --git a/lib/src/utils/MxContent.dart b/lib/src/utils/mx_content.dart
similarity index 97%
rename from lib/src/utils/MxContent.dart
rename to lib/src/utils/mx_content.dart
index fd2984e..61a09aa 100644
--- a/lib/src/utils/MxContent.dart
+++ b/lib/src/utils/mx_content.dart
@@ -21,7 +21,7 @@
* along with famedlysdk. If not, see .
*/
-import 'package:famedlysdk/src/Client.dart';
+import 'package:famedlysdk/src/client.dart';
import 'dart:core';
/// A file in Matrix presented by a mxc:// uri scheme.
diff --git a/lib/src/utils/Profile.dart b/lib/src/utils/profile.dart
similarity index 91%
rename from lib/src/utils/Profile.dart
rename to lib/src/utils/profile.dart
index c17af43..5a2c3c7 100644
--- a/lib/src/utils/Profile.dart
+++ b/lib/src/utils/profile.dart
@@ -1,4 +1,4 @@
-import 'package:famedlysdk/src/utils/MxContent.dart';
+import 'package:famedlysdk/src/utils/mx_content.dart';
/// Represents a user profile returned by a /profile request.
class Profile {
diff --git a/lib/src/utils/PushRules.dart b/lib/src/utils/push_rules.dart
similarity index 100%
rename from lib/src/utils/PushRules.dart
rename to lib/src/utils/push_rules.dart
diff --git a/lib/src/utils/Receipt.dart b/lib/src/utils/receipt.dart
similarity index 88%
rename from lib/src/utils/Receipt.dart
rename to lib/src/utils/receipt.dart
index 56f2748..4f15495 100644
--- a/lib/src/utils/Receipt.dart
+++ b/lib/src/utils/receipt.dart
@@ -1,4 +1,4 @@
-import '../User.dart';
+import '../user.dart';
/// Represents a receipt.
/// This [user] has read an event at the given [time].
diff --git a/lib/src/utils/StatesMap.dart b/lib/src/utils/states_map.dart
similarity index 100%
rename from lib/src/utils/StatesMap.dart
rename to lib/src/utils/states_map.dart
diff --git a/test/Client_test.dart b/test/client_test.dart
similarity index 95%
rename from test/Client_test.dart
rename to test/client_test.dart
index da48cf5..e8dcd97 100644
--- a/test/Client_test.dart
+++ b/test/client_test.dart
@@ -23,20 +23,20 @@
import 'dart:async';
-import 'package:famedlysdk/src/AccountData.dart';
-import 'package:famedlysdk/src/Client.dart';
-import 'package:famedlysdk/src/Presence.dart';
-import 'package:famedlysdk/src/Room.dart';
-import 'package:famedlysdk/src/User.dart';
-import 'package:famedlysdk/src/sync/EventUpdate.dart';
-import 'package:famedlysdk/src/sync/RoomUpdate.dart';
-import 'package:famedlysdk/src/sync/UserUpdate.dart';
-import 'package:famedlysdk/src/utils/MatrixException.dart';
-import 'package:famedlysdk/src/utils/MatrixFile.dart';
-import 'package:famedlysdk/src/utils/Profile.dart';
+import 'package:famedlysdk/src/account_data.dart';
+import 'package:famedlysdk/src/client.dart';
+import 'package:famedlysdk/src/presence.dart';
+import 'package:famedlysdk/src/room.dart';
+import 'package:famedlysdk/src/user.dart';
+import 'package:famedlysdk/src/sync/event_update.dart';
+import 'package:famedlysdk/src/sync/room_update.dart';
+import 'package:famedlysdk/src/sync/user_update.dart';
+import 'package:famedlysdk/src/utils/matrix_exception.dart';
+import 'package:famedlysdk/src/utils/matrix_file.dart';
+import 'package:famedlysdk/src/utils/profile.dart';
import 'package:test/test.dart';
-import 'FakeMatrixApi.dart';
+import 'fake_matrix_api.dart';
void main() {
Client matrix;
diff --git a/test/Event_test.dart b/test/event_test.dart
similarity index 98%
rename from test/Event_test.dart
rename to test/event_test.dart
index e8ef318..d7e50d8 100644
--- a/test/Event_test.dart
+++ b/test/event_test.dart
@@ -24,10 +24,10 @@
import 'dart:convert';
import 'package:famedlysdk/famedlysdk.dart';
-import 'package:famedlysdk/src/Event.dart';
+import 'package:famedlysdk/src/event.dart';
import 'package:test/test.dart';
-import 'FakeMatrixApi.dart';
+import 'fake_matrix_api.dart';
void main() {
/// All Tests related to the Event
diff --git a/test/FakeMatrixApi.dart b/test/fake_matrix_api.dart
similarity index 100%
rename from test/FakeMatrixApi.dart
rename to test/fake_matrix_api.dart
diff --git a/test/MxContent_test.dart b/test/mx_content_test.dart
similarity index 94%
rename from test/MxContent_test.dart
rename to test/mx_content_test.dart
index 6f6ea4c..38a5ef3 100644
--- a/test/MxContent_test.dart
+++ b/test/mx_content_test.dart
@@ -22,10 +22,10 @@
*/
import 'package:test/test.dart';
-import 'package:famedlysdk/src/Client.dart';
-import 'package:famedlysdk/src/utils/MxContent.dart';
+import 'package:famedlysdk/src/client.dart';
+import 'package:famedlysdk/src/utils/mx_content.dart';
-import 'FakeMatrixApi.dart';
+import 'fake_matrix_api.dart';
void main() {
/// All Tests related to the MxContent
diff --git a/test/Presence_test.dart b/test/presence_test.dart
similarity index 100%
rename from test/Presence_test.dart
rename to test/presence_test.dart
diff --git a/test/PushRules_test.dart b/test/push_rules_test.dart
similarity index 99%
rename from test/PushRules_test.dart
rename to test/push_rules_test.dart
index 612e22a..37caf4c 100644
--- a/test/PushRules_test.dart
+++ b/test/push_rules_test.dart
@@ -21,7 +21,7 @@
* along with famedlysdk. If not, see .
*/
-import 'package:famedlysdk/src/utils/PushRules.dart';
+import 'package:famedlysdk/src/utils/push_rules.dart';
import 'package:test/test.dart';
void main() {
diff --git a/test/Room_test.dart b/test/room_test.dart
similarity index 97%
rename from test/Room_test.dart
rename to test/room_test.dart
index 719108f..0097cd3 100644
--- a/test/Room_test.dart
+++ b/test/room_test.dart
@@ -21,15 +21,15 @@
* along with famedlysdk. If not, see .
*/
-import 'package:famedlysdk/src/Client.dart';
-import 'package:famedlysdk/src/Event.dart';
-import 'package:famedlysdk/src/Room.dart';
-import 'package:famedlysdk/src/Timeline.dart';
-import 'package:famedlysdk/src/User.dart';
-import 'package:famedlysdk/src/utils/MatrixFile.dart';
+import 'package:famedlysdk/src/client.dart';
+import 'package:famedlysdk/src/event.dart';
+import 'package:famedlysdk/src/room.dart';
+import 'package:famedlysdk/src/timeline.dart';
+import 'package:famedlysdk/src/user.dart';
+import 'package:famedlysdk/src/utils/matrix_file.dart';
import 'package:test/test.dart';
-import 'FakeMatrixApi.dart';
+import 'fake_matrix_api.dart';
void main() {
Client matrix;
diff --git a/test/StatesMap_test.dart b/test/states_map_test.dart
similarity index 97%
rename from test/StatesMap_test.dart
rename to test/states_map_test.dart
index e8c6f41..6462ee5 100644
--- a/test/StatesMap_test.dart
+++ b/test/states_map_test.dart
@@ -23,7 +23,7 @@
import 'package:famedlysdk/famedlysdk.dart';
import 'package:test/test.dart';
-import 'package:famedlysdk/src/utils/StatesMap.dart';
+import 'package:famedlysdk/src/utils/states_map.dart';
void main() {
/// All Tests related to the ChatTime
diff --git a/test/Timeline_test.dart b/test/timeline_test.dart
similarity index 96%
rename from test/Timeline_test.dart
rename to test/timeline_test.dart
index 059f59a..495e2c8 100644
--- a/test/Timeline_test.dart
+++ b/test/timeline_test.dart
@@ -21,13 +21,13 @@
* along with famedlysdk. If not, see .
*/
-import 'package:famedlysdk/src/RoomAccountData.dart';
+import 'package:famedlysdk/src/room_account_data.dart';
import 'package:test/test.dart';
-import 'package:famedlysdk/src/Client.dart';
-import 'package:famedlysdk/src/Room.dart';
-import 'package:famedlysdk/src/Timeline.dart';
-import 'package:famedlysdk/src/sync/EventUpdate.dart';
-import 'FakeMatrixApi.dart';
+import 'package:famedlysdk/src/client.dart';
+import 'package:famedlysdk/src/room.dart';
+import 'package:famedlysdk/src/timeline.dart';
+import 'package:famedlysdk/src/sync/event_update.dart';
+import 'fake_matrix_api.dart';
void main() {
/// All Tests related to the MxContent
diff --git a/test/User_test.dart b/test/user_test.dart
similarity index 96%
rename from test/User_test.dart
rename to test/user_test.dart
index 1624d1d..a671a03 100644
--- a/test/User_test.dart
+++ b/test/user_test.dart
@@ -21,8 +21,8 @@
* along with famedlysdk. If not, see .
*/
-import 'package:famedlysdk/src/Event.dart';
-import 'package:famedlysdk/src/User.dart';
+import 'package:famedlysdk/src/event.dart';
+import 'package:famedlysdk/src/user.dart';
import 'package:test/test.dart';
void main() {