Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
amitkhairnar44 committed Dec 8, 2020
1 parent 8c2282d commit bc0689d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 21 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ The project is still in beta and not all features are available.
- Show repository details
- Star and un-star repository on org
- Activate and deactivate repository on org

#### TO-DO

- Trigger build


2 changes: 1 addition & 1 deletion lib/api/travis_ci_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TravisCIApi {
var res = await _netUtil.get(ApiUrls.jobUrl + id + '/log.txt', cancelToken,
headers: headers);
if (res.statusCode < 200 || res.statusCode > 400) {
throw new Exception(
throw Exception(
"Error while fetching data: ${res.statusCode} ${res.statusMessage}");
}
return res.data.toString();
Expand Down
10 changes: 6 additions & 4 deletions lib/pages/details.dart
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,12 @@ class _DetailsState extends State<Details> with SingleTickerProviderStateMixin {
width: 4.0,
),
Text(
_buildsStore.builds[index].state
.toString()
.split('.')
.last,
_buildsStore.builds[index].state != null
? _buildsStore.builds[index].state
.toString()
.split('.')
.last
: 'received',
style: TextStyle(
color: GetStateColor.getStateColor(
_buildsStore.builds[index].state),
Expand Down
15 changes: 5 additions & 10 deletions lib/pages/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,12 @@ import '../utils/icon_fonts.dart';
import 'my_account.dart';
import 'settings.dart';

class DrawerItem {
String title;
IconData icon;
DrawerItem(this.title, this.icon);
}

class HomePage extends StatefulWidget {
final FormStore store;

const HomePage({Key key, this.store}) : super(key: key);
@override
HomePageState createState() => new HomePageState();
HomePageState createState() => HomePageState();
}

class HomePageState extends State<HomePage> {
Expand Down Expand Up @@ -68,8 +62,9 @@ class HomePageState extends State<HomePage> {
trailing: Icon(Icons.keyboard_arrow_right),
contentPadding: const EdgeInsets.only(),
onTap: () {
Navigator.push(context, new MaterialPageRoute(
builder: (BuildContext context) {
Navigator.of(context).pop();
Navigator.push(context,
MaterialPageRoute(builder: (BuildContext context) {
return MyAccount(
formStore: widget.store,
);
Expand Down Expand Up @@ -135,7 +130,7 @@ class HomePageState extends State<HomePage> {
onTap: () {
Navigator.of(context).pop();
Navigator.push(context,
new MaterialPageRoute(builder: (BuildContext context) {
MaterialPageRoute(builder: (BuildContext context) {
return SettingsPage();
}));
},
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import '../widgets/openhub_logo.dart';

class SettingsPage extends StatefulWidget {
@override
_SettingsPageState createState() => new _SettingsPageState();
_SettingsPageState createState() => _SettingsPageState();
}

class _SettingsPageState extends State<SettingsPage> {
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/network_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import '../init/init.dart';

class NetworkUtil with NetworkUtilMixin {
// next three lines makes this class a Singleton
static NetworkUtil _instance = new NetworkUtil.internal();
static NetworkUtil _instance = NetworkUtil.internal();

final Dio _dio = Dio();

Expand All @@ -33,7 +33,7 @@ class NetworkUtil with NetworkUtilMixin {
//print(res);
final int statusCode = response.statusCode;
if (statusCode < 200 || statusCode > 400 || json == null) {
throw new Exception(
throw Exception(
"Error while fetching data: ${response.statusCode} ${response.statusMessage}");
}
return res;
Expand Down

0 comments on commit bc0689d

Please sign in to comment.